mirror of
https://github.com/Leonmmcoset/cleonos.git
synced 2026-04-21 18:44:01 +00:00
Compare commits
52 Commits
XLeonOS
...
27a51a0986
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27a51a0986 | ||
|
|
16855e4b98 | ||
|
|
dbd88505e6 | ||
|
|
d7e1cb62ee | ||
|
|
98897031e8 | ||
|
|
315b230dc4 | ||
|
|
a4f2c8eb89 | ||
|
|
1a3510d8d9 | ||
|
|
c21c5b327e | ||
|
|
739be1d7f7 | ||
|
|
863f85ae4f | ||
|
|
42159d1af8 | ||
|
|
14b86d50bd | ||
|
|
829544c508 | ||
|
|
f7af97ebc3 | ||
|
|
78517d670b | ||
|
|
e7062c3045 | ||
|
|
af477d0602 | ||
|
|
8803d5a5d4 | ||
|
|
97a65b3580 | ||
|
|
1678af87b8 | ||
|
|
ddacc3e863 | ||
|
|
c587215e80 | ||
|
|
6b3c74f66f | ||
|
|
6a93335e53 | ||
|
|
8e968af551 | ||
|
|
2f0ee08485 | ||
|
|
e83b51f220 | ||
|
|
caf948f4f6 | ||
|
|
db1b849957 | ||
|
|
59b1b05e0d | ||
|
|
56bfa58e56 | ||
|
|
081b0d391a | ||
|
|
d4c2c62543 | ||
|
|
5817722cd3 | ||
|
|
bf6720c6e8 | ||
|
|
cb2406cbed | ||
|
|
42b5925222 | ||
|
|
f93af4a2a6 | ||
|
|
bf41872d8d | ||
|
|
589a83cb07 | ||
|
|
2d843a100e | ||
|
|
4eae6c34c4 | ||
|
|
643b26cfb2 | ||
|
|
af4ad36f6a | ||
|
|
25b2c080c1 | ||
|
|
8483ab7141 | ||
|
|
56ca2f5fdb | ||
|
|
3725203496 | ||
|
|
0a50c6a146 | ||
|
|
dad78c4f2e | ||
|
|
ceb04e9289 |
@@ -1,112 +0,0 @@
|
||||
# Details
|
||||
|
||||
Date : 2026-04-11 19:00:52
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 97 files, 7635 codes, 8 comments, 1894 blanks, all 9537 lines
|
||||
|
||||
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
|
||||
## Files
|
||||
| filename | language | code | comment | blank | total |
|
||||
| :--- | :--- | ---: | ---: | ---: | ---: |
|
||||
| [CMakeLists.txt](/CMakeLists.txt) | CMake | 535 | 0 | 75 | 610 |
|
||||
| [Makefile](/Makefile) | Makefile | 100 | 0 | 22 | 122 |
|
||||
| [cleonos/c/apps/elfrunner\_kmain.c](/cleonos/c/apps/elfrunner_kmain.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/elfrunner\_main.c](/cleonos/c/apps/elfrunner_main.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/memc\_kmain.c](/cleonos/c/apps/memc_kmain.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/memc\_main.c](/cleonos/c/apps/memc_main.c) | C | 8 | 0 | 3 | 11 |
|
||||
| [cleonos/c/apps/shell\_main.c](/cleonos/c/apps/shell_main.c) | C | 396 | 0 | 124 | 520 |
|
||||
| [cleonos/c/apps/ttydrv\_main.c](/cleonos/c/apps/ttydrv_main.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/include/cleonos\_rust\_bridge.h](/cleonos/c/include/cleonos_rust_bridge.h) | C++ | 6 | 0 | 4 | 10 |
|
||||
| [cleonos/c/include/cleonos\_syscall.h](/cleonos/c/include/cleonos_syscall.h) | C++ | 60 | 0 | 5 | 65 |
|
||||
| [cleonos/c/src/runtime.c](/cleonos/c/src/runtime.c) | C | 11 | 0 | 6 | 17 |
|
||||
| [cleonos/c/src/syscall.c](/cleonos/c/src/syscall.c) | C | 89 | 0 | 29 | 118 |
|
||||
| [cleonos/c/stub.c](/cleonos/c/stub.c) | C | 3 | 4 | 2 | 9 |
|
||||
| [cleonos/rust/src/lib.rs](/cleonos/rust/src/lib.rs) | Rust | 23 | 0 | 9 | 32 |
|
||||
| [clks/arch/aarch64/boot.c](/clks/arch/aarch64/boot.c) | C | 6 | 0 | 1 | 7 |
|
||||
| [clks/arch/x86\_64/boot.c](/clks/arch/x86_64/boot.c) | C | 6 | 0 | 1 | 7 |
|
||||
| [clks/arch/x86\_64/interrupt\_stubs.S](/clks/arch/x86_64/interrupt_stubs.S) | Go Assembly | 108 | 0 | 12 | 120 |
|
||||
| [clks/drivers/serial/serial.c](/clks/drivers/serial/serial.c) | C | 52 | 0 | 16 | 68 |
|
||||
| [clks/drivers/video/font8x8.c](/clks/drivers/video/font8x8.c) | C | 67 | 0 | 8 | 75 |
|
||||
| [clks/drivers/video/font8x8.h](/clks/drivers/video/font8x8.h) | C++ | 5 | 0 | 3 | 8 |
|
||||
| [clks/drivers/video/framebuffer.c](/clks/drivers/video/framebuffer.c) | C | 162 | 0 | 42 | 204 |
|
||||
| [clks/drivers/video/psf\_font.c](/clks/drivers/video/psf_font.c) | C | 159 | 0 | 35 | 194 |
|
||||
| [clks/drivers/video/psf\_font.h](/clks/drivers/video/psf_font.h) | C++ | 14 | 0 | 4 | 18 |
|
||||
| [clks/include/clks/boot.h](/clks/include/clks/boot.h) | C++ | 11 | 0 | 4 | 15 |
|
||||
| [clks/include/clks/compiler.h](/clks/include/clks/compiler.h) | C++ | 13 | 0 | 4 | 17 |
|
||||
| [clks/include/clks/cpu.h](/clks/include/clks/cpu.h) | C++ | 20 | 0 | 4 | 24 |
|
||||
| [clks/include/clks/driver.h](/clks/include/clks/driver.h) | C++ | 28 | 0 | 8 | 36 |
|
||||
| [clks/include/clks/elf64.h](/clks/include/clks/elf64.h) | C++ | 27 | 0 | 8 | 35 |
|
||||
| [clks/include/clks/elfrunner.h](/clks/include/clks/elfrunner.h) | C++ | 6 | 0 | 3 | 9 |
|
||||
| [clks/include/clks/exec.h](/clks/include/clks/exec.h) | C++ | 8 | 0 | 3 | 11 |
|
||||
| [clks/include/clks/framebuffer.h](/clks/include/clks/framebuffer.h) | C++ | 20 | 0 | 4 | 24 |
|
||||
| [clks/include/clks/fs.h](/clks/include/clks/fs.h) | C++ | 23 | 0 | 7 | 30 |
|
||||
| [clks/include/clks/heap.h](/clks/include/clks/heap.h) | C++ | 15 | 0 | 4 | 19 |
|
||||
| [clks/include/clks/interrupts.h](/clks/include/clks/interrupts.h) | C++ | 6 | 0 | 3 | 9 |
|
||||
| [clks/include/clks/kelf.h](/clks/include/clks/kelf.h) | C++ | 9 | 0 | 5 | 14 |
|
||||
| [clks/include/clks/kernel.h](/clks/include/clks/kernel.h) | C++ | 4 | 0 | 2 | 6 |
|
||||
| [clks/include/clks/keyboard.h](/clks/include/clks/keyboard.h) | C++ | 19 | 0 | 5 | 24 |
|
||||
| [clks/include/clks/limine.h](/clks/include/clks/limine.h) | C++ | 132 | 0 | 24 | 156 |
|
||||
| [clks/include/clks/log.h](/clks/include/clks/log.h) | C++ | 12 | 0 | 4 | 16 |
|
||||
| [clks/include/clks/pmm.h](/clks/include/clks/pmm.h) | C++ | 16 | 0 | 5 | 21 |
|
||||
| [clks/include/clks/ramdisk.h](/clks/include/clks/ramdisk.h) | C++ | 17 | 0 | 8 | 25 |
|
||||
| [clks/include/clks/scheduler.h](/clks/include/clks/scheduler.h) | C++ | 18 | 0 | 5 | 23 |
|
||||
| [clks/include/clks/serial.h](/clks/include/clks/serial.h) | C++ | 6 | 0 | 2 | 8 |
|
||||
| [clks/include/clks/service.h](/clks/include/clks/service.h) | C++ | 31 | 0 | 8 | 39 |
|
||||
| [clks/include/clks/shell.h](/clks/include/clks/shell.h) | C++ | 7 | 0 | 3 | 10 |
|
||||
| [clks/include/clks/string.h](/clks/include/clks/string.h) | C++ | 9 | 0 | 3 | 12 |
|
||||
| [clks/include/clks/syscall.h](/clks/include/clks/syscall.h) | C++ | 34 | 0 | 4 | 38 |
|
||||
| [clks/include/clks/task.h](/clks/include/clks/task.h) | C++ | 24 | 0 | 7 | 31 |
|
||||
| [clks/include/clks/tty.h](/clks/include/clks/tty.h) | C++ | 12 | 0 | 5 | 17 |
|
||||
| [clks/include/clks/types.h](/clks/include/clks/types.h) | C++ | 17 | 0 | 6 | 23 |
|
||||
| [clks/include/clks/userland.h](/clks/include/clks/userland.h) | C++ | 11 | 0 | 4 | 15 |
|
||||
| [clks/kernel/driver.c](/clks/kernel/driver.c) | C | 163 | 0 | 48 | 211 |
|
||||
| [clks/kernel/elf64.c](/clks/kernel/elf64.c) | C | 170 | 0 | 52 | 222 |
|
||||
| [clks/kernel/elfrunner.c](/clks/kernel/elfrunner.c) | C | 30 | 0 | 8 | 38 |
|
||||
| [clks/kernel/exec.c](/clks/kernel/exec.c) | C | 51 | 0 | 15 | 66 |
|
||||
| [clks/kernel/fs.c](/clks/kernel/fs.c) | C | 698 | 0 | 220 | 918 |
|
||||
| [clks/kernel/heap.c](/clks/kernel/heap.c) | C | 134 | 0 | 42 | 176 |
|
||||
| [clks/kernel/interrupts.c](/clks/kernel/interrupts.c) | C | 298 | 0 | 43 | 341 |
|
||||
| [clks/kernel/kelf.c](/clks/kernel/kelf.c) | C | 203 | 1 | 53 | 257 |
|
||||
| [clks/kernel/keyboard.c](/clks/kernel/keyboard.c) | C | 199 | 0 | 42 | 241 |
|
||||
| [clks/kernel/kmain.c](/clks/kernel/kmain.c) | C | 180 | 1 | 50 | 231 |
|
||||
| [clks/kernel/limine\_requests.c](/clks/kernel/limine_requests.c) | C | 76 | 0 | 26 | 102 |
|
||||
| [clks/kernel/log.c](/clks/kernel/log.c) | C | 79 | 0 | 17 | 96 |
|
||||
| [clks/kernel/pmm.c](/clks/kernel/pmm.c) | C | 82 | 0 | 23 | 105 |
|
||||
| [clks/kernel/ramdisk.c](/clks/kernel/ramdisk.c) | C | 172 | 0 | 50 | 222 |
|
||||
| [clks/kernel/scheduler.c](/clks/kernel/scheduler.c) | C | 127 | 0 | 42 | 169 |
|
||||
| [clks/kernel/service.c](/clks/kernel/service.c) | C | 113 | 0 | 34 | 147 |
|
||||
| [clks/kernel/shell.c](/clks/kernel/shell.c) | C | 860 | 0 | 230 | 1,090 |
|
||||
| [clks/kernel/syscall.c](/clks/kernel/syscall.c) | C | 243 | 0 | 50 | 293 |
|
||||
| [clks/kernel/tty.c](/clks/kernel/tty.c) | C | 275 | 0 | 77 | 352 |
|
||||
| [clks/kernel/userland.c](/clks/kernel/userland.c) | C | 113 | 0 | 32 | 145 |
|
||||
| [clks/lib/string.c](/clks/lib/string.c) | C | 54 | 0 | 16 | 70 |
|
||||
| [cmake/check\_tools.cmake](/cmake/check_tools.cmake) | CMake | 32 | 0 | 6 | 38 |
|
||||
| [cmake/log.cmake](/cmake/log.cmake) | CMake | 30 | 0 | 6 | 36 |
|
||||
| [cmake/log\_emit.cmake](/cmake/log_emit.cmake) | CMake | 23 | 0 | 6 | 29 |
|
||||
| [cmake/setup\_limine.cmake](/cmake/setup_limine.cmake) | CMake | 100 | 0 | 18 | 118 |
|
||||
| [configs/limine.conf](/configs/limine.conf) | Properties | 6 | 0 | 1 | 7 |
|
||||
| [docs/README.md](/docs/README.md) | Markdown | 22 | 0 | 2 | 24 |
|
||||
| [docs/stage1.md](/docs/stage1.md) | Markdown | 41 | 0 | 5 | 46 |
|
||||
| [docs/stage10.md](/docs/stage10.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage11.md](/docs/stage11.md) | Markdown | 36 | 0 | 5 | 41 |
|
||||
| [docs/stage12.md](/docs/stage12.md) | Markdown | 40 | 0 | 6 | 46 |
|
||||
| [docs/stage13.md](/docs/stage13.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage14.md](/docs/stage14.md) | Markdown | 44 | 0 | 8 | 52 |
|
||||
| [docs/stage15.md](/docs/stage15.md) | Markdown | 47 | 0 | 7 | 54 |
|
||||
| [docs/stage2.md](/docs/stage2.md) | Markdown | 30 | 0 | 5 | 35 |
|
||||
| [docs/stage20.md](/docs/stage20.md) | Markdown | 46 | 0 | 6 | 52 |
|
||||
| [docs/stage21.md](/docs/stage21.md) | Markdown | 72 | 0 | 7 | 79 |
|
||||
| [docs/stage3.md](/docs/stage3.md) | Markdown | 29 | 0 | 5 | 34 |
|
||||
| [docs/stage4.md](/docs/stage4.md) | Markdown | 30 | 0 | 5 | 35 |
|
||||
| [docs/stage5.md](/docs/stage5.md) | Markdown | 29 | 0 | 5 | 34 |
|
||||
| [docs/stage6.md](/docs/stage6.md) | Markdown | 30 | 0 | 6 | 36 |
|
||||
| [docs/stage7.md](/docs/stage7.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage8.md](/docs/stage8.md) | Markdown | 31 | 0 | 6 | 37 |
|
||||
| [docs/stage9.md](/docs/stage9.md) | Markdown | 31 | 0 | 6 | 37 |
|
||||
| [ramdisk/shell/init.cmd](/ramdisk/shell/init.cmd) | Batch | 11 | 0 | 2 | 13 |
|
||||
| [scripts/gen-tty-psf.ps1](/scripts/gen-tty-psf.ps1) | PowerShell | 64 | 2 | 18 | 84 |
|
||||
|
||||
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
@@ -1,15 +0,0 @@
|
||||
# Diff Details
|
||||
|
||||
Date : 2026-04-11 19:00:52
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
||||
|
||||
## Files
|
||||
| filename | language | code | comment | blank | total |
|
||||
| :--- | :--- | ---: | ---: | ---: | ---: |
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
||||
@@ -1,2 +0,0 @@
|
||||
"filename", "language", "", "comment", "blank", "total"
|
||||
"Total", "-", , 0, 0, 0
|
||||
|
@@ -1,19 +0,0 @@
|
||||
# Diff Summary
|
||||
|
||||
Date : 2026-04-11 19:00:52
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
||||
|
||||
## Languages
|
||||
| language | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
|
||||
## Directories
|
||||
| path | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
||||
@@ -1,22 +0,0 @@
|
||||
Date : 2026-04-11 19:00:52
|
||||
Directory : d:\Projects\C\cleonos
|
||||
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
|
||||
|
||||
Languages
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
| language | files | code | comment | blank | total |
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
|
||||
Directories
|
||||
+------+------------+------------+------------+------------+------------+
|
||||
| path | files | code | comment | blank | total |
|
||||
+------+------------+------------+------------+------------+------------+
|
||||
+------+------------+------------+------------+------------+------------+
|
||||
|
||||
Files
|
||||
+----------+----------+------------+------------+------------+------------+
|
||||
| filename | language | code | comment | blank | total |
|
||||
+----------+----------+------------+------------+------------+------------+
|
||||
| Total | | 0 | 0 | 0 | 0 |
|
||||
+----------+----------+------------+------------+------------+------------+
|
||||
@@ -1,99 +0,0 @@
|
||||
"filename", "language", "PowerShell", "CMake", "Markdown", "Batch", "Makefile", "Properties", "C++", "C", "Go Assembly", "Rust", "comment", "blank", "total"
|
||||
"d:\Projects\C\cleonos\CMakeLists.txt", "CMake", 0, 535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 610
|
||||
"d:\Projects\C\cleonos\Makefile", "Makefile", 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 22, 122
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_kmain.c", "C", 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memc_kmain.c", "C", 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memc_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 3, 11
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 396, 0, 0, 0, 124, 520
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ttydrv_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_rust_bridge.h", "C++", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 4, 10
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h", "C++", 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 5, 65
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\runtime.c", "C", 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 6, 17
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\syscall.c", "C", 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 29, 118
|
||||
"d:\Projects\C\cleonos\cleonos\c\stub.c", "C", 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 4, 2, 9
|
||||
"d:\Projects\C\cleonos\cleonos\rust\src\lib.rs", "Rust", 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 9, 32
|
||||
"d:\Projects\C\cleonos\clks\arch\aarch64\boot.c", "C", 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\boot.c", "C", 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\interrupt_stubs.S", "Go Assembly", 0, 0, 0, 0, 0, 0, 0, 0, 108, 0, 0, 12, 120
|
||||
"d:\Projects\C\cleonos\clks\drivers\serial\serial.c", "C", 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 16, 68
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\font8x8.c", "C", 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 8, 75
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\font8x8.h", "C++", 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 3, 8
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\framebuffer.c", "C", 0, 0, 0, 0, 0, 0, 0, 162, 0, 0, 0, 42, 204
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\psf_font.c", "C", 0, 0, 0, 0, 0, 0, 0, 159, 0, 0, 0, 35, 194
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\psf_font.h", "C++", 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 4, 18
|
||||
"d:\Projects\C\cleonos\clks\include\clks\boot.h", "C++", 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 4, 15
|
||||
"d:\Projects\C\cleonos\clks\include\clks\compiler.h", "C++", 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 4, 17
|
||||
"d:\Projects\C\cleonos\clks\include\clks\cpu.h", "C++", 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 4, 24
|
||||
"d:\Projects\C\cleonos\clks\include\clks\driver.h", "C++", 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 8, 36
|
||||
"d:\Projects\C\cleonos\clks\include\clks\elf64.h", "C++", 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 8, 35
|
||||
"d:\Projects\C\cleonos\clks\include\clks\elfrunner.h", "C++", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\clks\include\clks\exec.h", "C++", 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 3, 11
|
||||
"d:\Projects\C\cleonos\clks\include\clks\framebuffer.h", "C++", 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 4, 24
|
||||
"d:\Projects\C\cleonos\clks\include\clks\fs.h", "C++", 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 7, 30
|
||||
"d:\Projects\C\cleonos\clks\include\clks\heap.h", "C++", 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 4, 19
|
||||
"d:\Projects\C\cleonos\clks\include\clks\interrupts.h", "C++", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\clks\include\clks\kelf.h", "C++", 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 5, 14
|
||||
"d:\Projects\C\cleonos\clks\include\clks\kernel.h", "C++", 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 2, 6
|
||||
"d:\Projects\C\cleonos\clks\include\clks\keyboard.h", "C++", 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 5, 24
|
||||
"d:\Projects\C\cleonos\clks\include\clks\limine.h", "C++", 0, 0, 0, 0, 0, 0, 132, 0, 0, 0, 0, 24, 156
|
||||
"d:\Projects\C\cleonos\clks\include\clks\log.h", "C++", 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 4, 16
|
||||
"d:\Projects\C\cleonos\clks\include\clks\pmm.h", "C++", 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 5, 21
|
||||
"d:\Projects\C\cleonos\clks\include\clks\ramdisk.h", "C++", 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 8, 25
|
||||
"d:\Projects\C\cleonos\clks\include\clks\scheduler.h", "C++", 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 5, 23
|
||||
"d:\Projects\C\cleonos\clks\include\clks\serial.h", "C++", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 2, 8
|
||||
"d:\Projects\C\cleonos\clks\include\clks\service.h", "C++", 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 8, 39
|
||||
"d:\Projects\C\cleonos\clks\include\clks\shell.h", "C++", 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 3, 10
|
||||
"d:\Projects\C\cleonos\clks\include\clks\string.h", "C++", 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 3, 12
|
||||
"d:\Projects\C\cleonos\clks\include\clks\syscall.h", "C++", 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 4, 38
|
||||
"d:\Projects\C\cleonos\clks\include\clks\task.h", "C++", 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 7, 31
|
||||
"d:\Projects\C\cleonos\clks\include\clks\tty.h", "C++", 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 5, 17
|
||||
"d:\Projects\C\cleonos\clks\include\clks\types.h", "C++", 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 6, 23
|
||||
"d:\Projects\C\cleonos\clks\include\clks\userland.h", "C++", 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 4, 15
|
||||
"d:\Projects\C\cleonos\clks\kernel\driver.c", "C", 0, 0, 0, 0, 0, 0, 0, 163, 0, 0, 0, 48, 211
|
||||
"d:\Projects\C\cleonos\clks\kernel\elf64.c", "C", 0, 0, 0, 0, 0, 0, 0, 170, 0, 0, 0, 52, 222
|
||||
"d:\Projects\C\cleonos\clks\kernel\elfrunner.c", "C", 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 8, 38
|
||||
"d:\Projects\C\cleonos\clks\kernel\exec.c", "C", 0, 0, 0, 0, 0, 0, 0, 51, 0, 0, 0, 15, 66
|
||||
"d:\Projects\C\cleonos\clks\kernel\fs.c", "C", 0, 0, 0, 0, 0, 0, 0, 698, 0, 0, 0, 220, 918
|
||||
"d:\Projects\C\cleonos\clks\kernel\heap.c", "C", 0, 0, 0, 0, 0, 0, 0, 134, 0, 0, 0, 42, 176
|
||||
"d:\Projects\C\cleonos\clks\kernel\interrupts.c", "C", 0, 0, 0, 0, 0, 0, 0, 298, 0, 0, 0, 43, 341
|
||||
"d:\Projects\C\cleonos\clks\kernel\kelf.c", "C", 0, 0, 0, 0, 0, 0, 0, 203, 0, 0, 1, 53, 257
|
||||
"d:\Projects\C\cleonos\clks\kernel\keyboard.c", "C", 0, 0, 0, 0, 0, 0, 0, 199, 0, 0, 0, 42, 241
|
||||
"d:\Projects\C\cleonos\clks\kernel\kmain.c", "C", 0, 0, 0, 0, 0, 0, 0, 180, 0, 0, 1, 50, 231
|
||||
"d:\Projects\C\cleonos\clks\kernel\limine_requests.c", "C", 0, 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 26, 102
|
||||
"d:\Projects\C\cleonos\clks\kernel\log.c", "C", 0, 0, 0, 0, 0, 0, 0, 79, 0, 0, 0, 17, 96
|
||||
"d:\Projects\C\cleonos\clks\kernel\pmm.c", "C", 0, 0, 0, 0, 0, 0, 0, 82, 0, 0, 0, 23, 105
|
||||
"d:\Projects\C\cleonos\clks\kernel\ramdisk.c", "C", 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 0, 50, 222
|
||||
"d:\Projects\C\cleonos\clks\kernel\scheduler.c", "C", 0, 0, 0, 0, 0, 0, 0, 127, 0, 0, 0, 42, 169
|
||||
"d:\Projects\C\cleonos\clks\kernel\service.c", "C", 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 34, 147
|
||||
"d:\Projects\C\cleonos\clks\kernel\shell.c", "C", 0, 0, 0, 0, 0, 0, 0, 860, 0, 0, 0, 230, 1090
|
||||
"d:\Projects\C\cleonos\clks\kernel\syscall.c", "C", 0, 0, 0, 0, 0, 0, 0, 243, 0, 0, 0, 50, 293
|
||||
"d:\Projects\C\cleonos\clks\kernel\tty.c", "C", 0, 0, 0, 0, 0, 0, 0, 275, 0, 0, 0, 77, 352
|
||||
"d:\Projects\C\cleonos\clks\kernel\userland.c", "C", 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 32, 145
|
||||
"d:\Projects\C\cleonos\clks\lib\string.c", "C", 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 16, 70
|
||||
"d:\Projects\C\cleonos\cmake\check_tools.cmake", "CMake", 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 38
|
||||
"d:\Projects\C\cleonos\cmake\log.cmake", "CMake", 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 36
|
||||
"d:\Projects\C\cleonos\cmake\log_emit.cmake", "CMake", 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 29
|
||||
"d:\Projects\C\cleonos\cmake\setup_limine.cmake", "CMake", 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 118
|
||||
"d:\Projects\C\cleonos\configs\limine.conf", "Properties", 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\docs\README.md", "Markdown", 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 2, 24
|
||||
"d:\Projects\C\cleonos\docs\stage1.md", "Markdown", 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 5, 46
|
||||
"d:\Projects\C\cleonos\docs\stage10.md", "Markdown", 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage11.md", "Markdown", 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 5, 41
|
||||
"d:\Projects\C\cleonos\docs\stage12.md", "Markdown", 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 6, 46
|
||||
"d:\Projects\C\cleonos\docs\stage13.md", "Markdown", 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage14.md", "Markdown", 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 8, 52
|
||||
"d:\Projects\C\cleonos\docs\stage15.md", "Markdown", 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 7, 54
|
||||
"d:\Projects\C\cleonos\docs\stage2.md", "Markdown", 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 5, 35
|
||||
"d:\Projects\C\cleonos\docs\stage20.md", "Markdown", 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 6, 52
|
||||
"d:\Projects\C\cleonos\docs\stage21.md", "Markdown", 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 7, 79
|
||||
"d:\Projects\C\cleonos\docs\stage3.md", "Markdown", 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 5, 34
|
||||
"d:\Projects\C\cleonos\docs\stage4.md", "Markdown", 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 5, 35
|
||||
"d:\Projects\C\cleonos\docs\stage5.md", "Markdown", 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 5, 34
|
||||
"d:\Projects\C\cleonos\docs\stage6.md", "Markdown", 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 6, 36
|
||||
"d:\Projects\C\cleonos\docs\stage7.md", "Markdown", 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage8.md", "Markdown", 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 6, 37
|
||||
"d:\Projects\C\cleonos\docs\stage9.md", "Markdown", 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 6, 37
|
||||
"d:\Projects\C\cleonos\ramdisk\shell\init.cmd", "Batch", 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 2, 13
|
||||
"d:\Projects\C\cleonos\scripts\gen-tty-psf.ps1", "PowerShell", 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 18, 84
|
||||
"Total", "-", 64, 720, 660, 11, 100, 6, 640, 5303, 108, 23, 8, 1894, 9537
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1,56 +0,0 @@
|
||||
# Summary
|
||||
|
||||
Date : 2026-04-11 19:00:52
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 97 files, 7635 codes, 8 comments, 1894 blanks, all 9537 lines
|
||||
|
||||
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
|
||||
## Languages
|
||||
| language | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| C | 36 | 5,303 | 6 | 1,449 | 6,758 |
|
||||
| CMake | 5 | 720 | 0 | 111 | 831 |
|
||||
| Markdown | 18 | 660 | 0 | 102 | 762 |
|
||||
| C++ | 32 | 640 | 0 | 168 | 808 |
|
||||
| Go Assembly | 1 | 108 | 0 | 12 | 120 |
|
||||
| Makefile | 1 | 100 | 0 | 22 | 122 |
|
||||
| PowerShell | 1 | 64 | 2 | 18 | 84 |
|
||||
| Rust | 1 | 23 | 0 | 9 | 32 |
|
||||
| Batch | 1 | 11 | 0 | 2 | 13 |
|
||||
| Properties | 1 | 6 | 0 | 1 | 7 |
|
||||
|
||||
## Directories
|
||||
| path | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| . | 97 | 7,635 | 8 | 1,894 | 9,537 |
|
||||
| . (Files) | 2 | 635 | 0 | 97 | 732 |
|
||||
| cleonos | 12 | 620 | 4 | 194 | 818 |
|
||||
| cleonos\\c | 11 | 597 | 4 | 185 | 786 |
|
||||
| cleonos\\c (Files) | 1 | 3 | 4 | 2 | 9 |
|
||||
| cleonos\\c\\apps | 6 | 428 | 0 | 139 | 567 |
|
||||
| cleonos\\c\\include | 2 | 66 | 0 | 9 | 75 |
|
||||
| cleonos\\c\\src | 2 | 100 | 0 | 35 | 135 |
|
||||
| cleonos\\rust | 1 | 23 | 0 | 9 | 32 |
|
||||
| cleonos\\rust\\src | 1 | 23 | 0 | 9 | 32 |
|
||||
| clks | 58 | 5,454 | 2 | 1,444 | 6,900 |
|
||||
| clks\\arch | 3 | 120 | 0 | 14 | 134 |
|
||||
| clks\\arch\\aarch64 | 1 | 6 | 0 | 1 | 7 |
|
||||
| clks\\arch\\x86_64 | 2 | 114 | 0 | 13 | 127 |
|
||||
| clks\\drivers | 6 | 459 | 0 | 108 | 567 |
|
||||
| clks\\drivers\\serial | 1 | 52 | 0 | 16 | 68 |
|
||||
| clks\\drivers\\video | 5 | 407 | 0 | 92 | 499 |
|
||||
| clks\\include | 28 | 555 | 0 | 152 | 707 |
|
||||
| clks\\include\\clks | 28 | 555 | 0 | 152 | 707 |
|
||||
| clks\\kernel | 20 | 4,266 | 2 | 1,154 | 5,422 |
|
||||
| clks\\lib | 1 | 54 | 0 | 16 | 70 |
|
||||
| cmake | 4 | 185 | 0 | 36 | 221 |
|
||||
| configs | 1 | 6 | 0 | 1 | 7 |
|
||||
| docs | 18 | 660 | 0 | 102 | 762 |
|
||||
| ramdisk | 1 | 11 | 0 | 2 | 13 |
|
||||
| ramdisk\\shell | 1 | 11 | 0 | 2 | 13 |
|
||||
| scripts | 1 | 64 | 2 | 18 | 84 |
|
||||
|
||||
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
@@ -1,156 +0,0 @@
|
||||
Date : 2026-04-11 19:00:52
|
||||
Directory : d:\Projects\C\cleonos
|
||||
Total : 97 files, 7635 codes, 8 comments, 1894 blanks, all 9537 lines
|
||||
|
||||
Languages
|
||||
+-------------+------------+------------+------------+------------+------------+
|
||||
| language | files | code | comment | blank | total |
|
||||
+-------------+------------+------------+------------+------------+------------+
|
||||
| C | 36 | 5,303 | 6 | 1,449 | 6,758 |
|
||||
| CMake | 5 | 720 | 0 | 111 | 831 |
|
||||
| Markdown | 18 | 660 | 0 | 102 | 762 |
|
||||
| C++ | 32 | 640 | 0 | 168 | 808 |
|
||||
| Go Assembly | 1 | 108 | 0 | 12 | 120 |
|
||||
| Makefile | 1 | 100 | 0 | 22 | 122 |
|
||||
| PowerShell | 1 | 64 | 2 | 18 | 84 |
|
||||
| Rust | 1 | 23 | 0 | 9 | 32 |
|
||||
| Batch | 1 | 11 | 0 | 2 | 13 |
|
||||
| Properties | 1 | 6 | 0 | 1 | 7 |
|
||||
+-------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Directories
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| path | files | code | comment | blank | total |
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| . | 97 | 7,635 | 8 | 1,894 | 9,537 |
|
||||
| . (Files) | 2 | 635 | 0 | 97 | 732 |
|
||||
| cleonos | 12 | 620 | 4 | 194 | 818 |
|
||||
| cleonos\c | 11 | 597 | 4 | 185 | 786 |
|
||||
| cleonos\c (Files) | 1 | 3 | 4 | 2 | 9 |
|
||||
| cleonos\c\apps | 6 | 428 | 0 | 139 | 567 |
|
||||
| cleonos\c\include | 2 | 66 | 0 | 9 | 75 |
|
||||
| cleonos\c\src | 2 | 100 | 0 | 35 | 135 |
|
||||
| cleonos\rust | 1 | 23 | 0 | 9 | 32 |
|
||||
| cleonos\rust\src | 1 | 23 | 0 | 9 | 32 |
|
||||
| clks | 58 | 5,454 | 2 | 1,444 | 6,900 |
|
||||
| clks\arch | 3 | 120 | 0 | 14 | 134 |
|
||||
| clks\arch\aarch64 | 1 | 6 | 0 | 1 | 7 |
|
||||
| clks\arch\x86_64 | 2 | 114 | 0 | 13 | 127 |
|
||||
| clks\drivers | 6 | 459 | 0 | 108 | 567 |
|
||||
| clks\drivers\serial | 1 | 52 | 0 | 16 | 68 |
|
||||
| clks\drivers\video | 5 | 407 | 0 | 92 | 499 |
|
||||
| clks\include | 28 | 555 | 0 | 152 | 707 |
|
||||
| clks\include\clks | 28 | 555 | 0 | 152 | 707 |
|
||||
| clks\kernel | 20 | 4,266 | 2 | 1,154 | 5,422 |
|
||||
| clks\lib | 1 | 54 | 0 | 16 | 70 |
|
||||
| cmake | 4 | 185 | 0 | 36 | 221 |
|
||||
| configs | 1 | 6 | 0 | 1 | 7 |
|
||||
| docs | 18 | 660 | 0 | 102 | 762 |
|
||||
| ramdisk | 1 | 11 | 0 | 2 | 13 |
|
||||
| ramdisk\shell | 1 | 11 | 0 | 2 | 13 |
|
||||
| scripts | 1 | 64 | 2 | 18 | 84 |
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Files
|
||||
+---------------------------------------------------------------+-------------+------------+------------+------------+------------+
|
||||
| filename | language | code | comment | blank | total |
|
||||
+---------------------------------------------------------------+-------------+------------+------------+------------+------------+
|
||||
| d:\Projects\C\cleonos\CMakeLists.txt | CMake | 535 | 0 | 75 | 610 |
|
||||
| d:\Projects\C\cleonos\Makefile | Makefile | 100 | 0 | 22 | 122 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_kmain.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_main.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memc_kmain.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memc_main.c | C | 8 | 0 | 3 | 11 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell_main.c | C | 396 | 0 | 124 | 520 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ttydrv_main.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_rust_bridge.h | C++ | 6 | 0 | 4 | 10 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h | C++ | 60 | 0 | 5 | 65 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\runtime.c | C | 11 | 0 | 6 | 17 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\syscall.c | C | 89 | 0 | 29 | 118 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\stub.c | C | 3 | 4 | 2 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\rust\src\lib.rs | Rust | 23 | 0 | 9 | 32 |
|
||||
| d:\Projects\C\cleonos\clks\arch\aarch64\boot.c | C | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\boot.c | C | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\interrupt_stubs.S | Go Assembly | 108 | 0 | 12 | 120 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\serial\serial.c | C | 52 | 0 | 16 | 68 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\font8x8.c | C | 67 | 0 | 8 | 75 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\font8x8.h | C++ | 5 | 0 | 3 | 8 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\framebuffer.c | C | 162 | 0 | 42 | 204 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\psf_font.c | C | 159 | 0 | 35 | 194 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\psf_font.h | C++ | 14 | 0 | 4 | 18 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\boot.h | C++ | 11 | 0 | 4 | 15 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\compiler.h | C++ | 13 | 0 | 4 | 17 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\cpu.h | C++ | 20 | 0 | 4 | 24 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\driver.h | C++ | 28 | 0 | 8 | 36 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\elf64.h | C++ | 27 | 0 | 8 | 35 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\elfrunner.h | C++ | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\exec.h | C++ | 8 | 0 | 3 | 11 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\framebuffer.h | C++ | 20 | 0 | 4 | 24 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\fs.h | C++ | 23 | 0 | 7 | 30 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\heap.h | C++ | 15 | 0 | 4 | 19 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\interrupts.h | C++ | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\kelf.h | C++ | 9 | 0 | 5 | 14 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\kernel.h | C++ | 4 | 0 | 2 | 6 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\keyboard.h | C++ | 19 | 0 | 5 | 24 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\limine.h | C++ | 132 | 0 | 24 | 156 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\log.h | C++ | 12 | 0 | 4 | 16 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\pmm.h | C++ | 16 | 0 | 5 | 21 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\ramdisk.h | C++ | 17 | 0 | 8 | 25 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\scheduler.h | C++ | 18 | 0 | 5 | 23 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\serial.h | C++ | 6 | 0 | 2 | 8 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\service.h | C++ | 31 | 0 | 8 | 39 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\shell.h | C++ | 7 | 0 | 3 | 10 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\string.h | C++ | 9 | 0 | 3 | 12 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\syscall.h | C++ | 34 | 0 | 4 | 38 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\task.h | C++ | 24 | 0 | 7 | 31 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\tty.h | C++ | 12 | 0 | 5 | 17 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\types.h | C++ | 17 | 0 | 6 | 23 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\userland.h | C++ | 11 | 0 | 4 | 15 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\driver.c | C | 163 | 0 | 48 | 211 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\elf64.c | C | 170 | 0 | 52 | 222 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\elfrunner.c | C | 30 | 0 | 8 | 38 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\exec.c | C | 51 | 0 | 15 | 66 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\fs.c | C | 698 | 0 | 220 | 918 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\heap.c | C | 134 | 0 | 42 | 176 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\interrupts.c | C | 298 | 0 | 43 | 341 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\kelf.c | C | 203 | 1 | 53 | 257 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\keyboard.c | C | 199 | 0 | 42 | 241 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\kmain.c | C | 180 | 1 | 50 | 231 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\limine_requests.c | C | 76 | 0 | 26 | 102 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\log.c | C | 79 | 0 | 17 | 96 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\pmm.c | C | 82 | 0 | 23 | 105 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\ramdisk.c | C | 172 | 0 | 50 | 222 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\scheduler.c | C | 127 | 0 | 42 | 169 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\service.c | C | 113 | 0 | 34 | 147 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\shell.c | C | 860 | 0 | 230 | 1,090 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\syscall.c | C | 243 | 0 | 50 | 293 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\tty.c | C | 275 | 0 | 77 | 352 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\userland.c | C | 113 | 0 | 32 | 145 |
|
||||
| d:\Projects\C\cleonos\clks\lib\string.c | C | 54 | 0 | 16 | 70 |
|
||||
| d:\Projects\C\cleonos\cmake\check_tools.cmake | CMake | 32 | 0 | 6 | 38 |
|
||||
| d:\Projects\C\cleonos\cmake\log.cmake | CMake | 30 | 0 | 6 | 36 |
|
||||
| d:\Projects\C\cleonos\cmake\log_emit.cmake | CMake | 23 | 0 | 6 | 29 |
|
||||
| d:\Projects\C\cleonos\cmake\setup_limine.cmake | CMake | 100 | 0 | 18 | 118 |
|
||||
| d:\Projects\C\cleonos\configs\limine.conf | Properties | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\docs\README.md | Markdown | 22 | 0 | 2 | 24 |
|
||||
| d:\Projects\C\cleonos\docs\stage1.md | Markdown | 41 | 0 | 5 | 46 |
|
||||
| d:\Projects\C\cleonos\docs\stage10.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage11.md | Markdown | 36 | 0 | 5 | 41 |
|
||||
| d:\Projects\C\cleonos\docs\stage12.md | Markdown | 40 | 0 | 6 | 46 |
|
||||
| d:\Projects\C\cleonos\docs\stage13.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage14.md | Markdown | 44 | 0 | 8 | 52 |
|
||||
| d:\Projects\C\cleonos\docs\stage15.md | Markdown | 47 | 0 | 7 | 54 |
|
||||
| d:\Projects\C\cleonos\docs\stage2.md | Markdown | 30 | 0 | 5 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage20.md | Markdown | 46 | 0 | 6 | 52 |
|
||||
| d:\Projects\C\cleonos\docs\stage21.md | Markdown | 72 | 0 | 7 | 79 |
|
||||
| d:\Projects\C\cleonos\docs\stage3.md | Markdown | 29 | 0 | 5 | 34 |
|
||||
| d:\Projects\C\cleonos\docs\stage4.md | Markdown | 30 | 0 | 5 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage5.md | Markdown | 29 | 0 | 5 | 34 |
|
||||
| d:\Projects\C\cleonos\docs\stage6.md | Markdown | 30 | 0 | 6 | 36 |
|
||||
| d:\Projects\C\cleonos\docs\stage7.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage8.md | Markdown | 31 | 0 | 6 | 37 |
|
||||
| d:\Projects\C\cleonos\docs\stage9.md | Markdown | 31 | 0 | 6 | 37 |
|
||||
| d:\Projects\C\cleonos\ramdisk\shell\init.cmd | Batch | 11 | 0 | 2 | 13 |
|
||||
| d:\Projects\C\cleonos\scripts\gen-tty-psf.ps1 | PowerShell | 64 | 2 | 18 | 84 |
|
||||
| Total | | 7,635 | 8 | 1,894 | 9,537 |
|
||||
+---------------------------------------------------------------+-------------+------------+------------+------------+------------+
|
||||
198
.VSCodeCounter/2026-04-17_16-44-24/details.md
Normal file
198
.VSCodeCounter/2026-04-17_16-44-24/details.md
Normal file
@@ -0,0 +1,198 @@
|
||||
# Details
|
||||
|
||||
Date : 2026-04-17 16:44:24
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 183 files, 22140 codes, 11 comments, 5616 blanks, all 27767 lines
|
||||
|
||||
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
|
||||
## Files
|
||||
| filename | language | code | comment | blank | total |
|
||||
| :--- | :--- | ---: | ---: | ---: | ---: |
|
||||
| [.github/workflows/build-os.yml](/.github/workflows/build-os.yml) | YAML | 48 | 0 | 10 | 58 |
|
||||
| [CMakeLists.txt](/CMakeLists.txt) | CMake | 587 | 0 | 86 | 673 |
|
||||
| [Makefile](/Makefile) | Makefile | 100 | 0 | 22 | 122 |
|
||||
| [README.md](/README.md) | Markdown | 92 | 0 | 34 | 126 |
|
||||
| [README.zh-CN.md](/README.zh-CN.md) | Markdown | 92 | 0 | 34 | 126 |
|
||||
| [cleonos/c/apps/ansi\_main.c](/cleonos/c/apps/ansi_main.c) | C | 43 | 0 | 11 | 54 |
|
||||
| [cleonos/c/apps/ansitest\_main.c](/cleonos/c/apps/ansitest_main.c) | C | 142 | 0 | 35 | 177 |
|
||||
| [cleonos/c/apps/append\_main.c](/cleonos/c/apps/append_main.c) | C | 74 | 0 | 18 | 92 |
|
||||
| [cleonos/c/apps/args\_main.c](/cleonos/c/apps/args_main.c) | C | 49 | 0 | 13 | 62 |
|
||||
| [cleonos/c/apps/cat\_main.c](/cleonos/c/apps/cat_main.c) | C | 83 | 0 | 24 | 107 |
|
||||
| [cleonos/c/apps/cd\_main.c](/cleonos/c/apps/cd_main.c) | C | 54 | 0 | 15 | 69 |
|
||||
| [cleonos/c/apps/clear\_main.c](/cleonos/c/apps/clear_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/apps/cmd\_runtime.c](/cleonos/c/apps/cmd_runtime.c) | C | 446 | 0 | 143 | 589 |
|
||||
| [cleonos/c/apps/cmd\_runtime.h](/cleonos/c/apps/cmd_runtime.h) | C++ | 80 | 0 | 19 | 99 |
|
||||
| [cleonos/c/apps/cp\_main.c](/cleonos/c/apps/cp_main.c) | C | 95 | 0 | 26 | 121 |
|
||||
| [cleonos/c/apps/cut\_main.c](/cleonos/c/apps/cut_main.c) | C | 214 | 1 | 55 | 270 |
|
||||
| [cleonos/c/apps/dmesg\_main.c](/cleonos/c/apps/dmesg_main.c) | C | 64 | 0 | 18 | 82 |
|
||||
| [cleonos/c/apps/elfrunner\_kmain.c](/cleonos/c/apps/elfrunner_kmain.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/elfrunner\_main.c](/cleonos/c/apps/elfrunner_main.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/exec\_main.c](/cleonos/c/apps/exec_main.c) | C | 87 | 0 | 22 | 109 |
|
||||
| [cleonos/c/apps/exit\_main.c](/cleonos/c/apps/exit_main.c) | C | 54 | 0 | 14 | 68 |
|
||||
| [cleonos/c/apps/fastfetch\_main.c](/cleonos/c/apps/fastfetch_main.c) | C | 180 | 0 | 34 | 214 |
|
||||
| [cleonos/c/apps/fsstat\_main.c](/cleonos/c/apps/fsstat_main.c) | C | 45 | 0 | 11 | 56 |
|
||||
| [cleonos/c/apps/grep\_main.c](/cleonos/c/apps/grep_main.c) | C | 195 | 0 | 54 | 249 |
|
||||
| [cleonos/c/apps/head\_main.c](/cleonos/c/apps/head_main.c) | C | 164 | 0 | 47 | 211 |
|
||||
| [cleonos/c/apps/hello\_main.c](/cleonos/c/apps/hello_main.c) | C | 6 | 0 | 2 | 8 |
|
||||
| [cleonos/c/apps/help\_main.c](/cleonos/c/apps/help_main.c) | C | 75 | 0 | 10 | 85 |
|
||||
| [cleonos/c/apps/kbdstat\_main.c](/cleonos/c/apps/kbdstat_main.c) | C | 44 | 0 | 11 | 55 |
|
||||
| [cleonos/c/apps/ls\_main.c](/cleonos/c/apps/ls_main.c) | C | 262 | 0 | 76 | 338 |
|
||||
| [cleonos/c/apps/memc\_kmain.c](/cleonos/c/apps/memc_kmain.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/memc\_main.c](/cleonos/c/apps/memc_main.c) | C | 8 | 0 | 3 | 11 |
|
||||
| [cleonos/c/apps/memstat\_main.c](/cleonos/c/apps/memstat_main.c) | C | 43 | 0 | 11 | 54 |
|
||||
| [cleonos/c/apps/mkdir\_main.c](/cleonos/c/apps/mkdir_main.c) | C | 57 | 0 | 16 | 73 |
|
||||
| [cleonos/c/apps/mv\_main.c](/cleonos/c/apps/mv_main.c) | C | 102 | 0 | 28 | 130 |
|
||||
| [cleonos/c/apps/pid\_main.c](/cleonos/c/apps/pid_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/apps/pwd\_main.c](/cleonos/c/apps/pwd_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/apps/restart\_main.c](/cleonos/c/apps/restart_main.c) | C | 40 | 0 | 11 | 51 |
|
||||
| [cleonos/c/apps/rm\_main.c](/cleonos/c/apps/rm_main.c) | C | 57 | 0 | 16 | 73 |
|
||||
| [cleonos/c/apps/shell/shell\_cmd.c](/cleonos/c/apps/shell/shell_cmd.c) | C | 2,311 | 0 | 574 | 2,885 |
|
||||
| [cleonos/c/apps/shell/shell\_external.c](/cleonos/c/apps/shell/shell_external.c) | C | 166 | 0 | 55 | 221 |
|
||||
| [cleonos/c/apps/shell/shell\_input.c](/cleonos/c/apps/shell/shell_input.c) | C | 514 | 0 | 132 | 646 |
|
||||
| [cleonos/c/apps/shell/shell\_internal.h](/cleonos/c/apps/shell/shell_internal.h) | C++ | 92 | 0 | 20 | 112 |
|
||||
| [cleonos/c/apps/shell/shell\_path.c](/cleonos/c/apps/shell/shell_path.c) | C | 153 | 0 | 50 | 203 |
|
||||
| [cleonos/c/apps/shell/shell\_script.c](/cleonos/c/apps/shell/shell_script.c) | C | 35 | 0 | 12 | 47 |
|
||||
| [cleonos/c/apps/shell/shell\_util.c](/cleonos/c/apps/shell/shell_util.c) | C | 283 | 0 | 86 | 369 |
|
||||
| [cleonos/c/apps/shell\_main.c](/cleonos/c/apps/shell_main.c) | C | 19 | 0 | 6 | 25 |
|
||||
| [cleonos/c/apps/shstat\_main.c](/cleonos/c/apps/shstat_main.c) | C | 45 | 0 | 11 | 56 |
|
||||
| [cleonos/c/apps/shutdown\_main.c](/cleonos/c/apps/shutdown_main.c) | C | 40 | 0 | 11 | 51 |
|
||||
| [cleonos/c/apps/sleep\_main.c](/cleonos/c/apps/sleep_main.c) | C | 52 | 0 | 14 | 66 |
|
||||
| [cleonos/c/apps/sort\_main.c](/cleonos/c/apps/sort_main.c) | C | 205 | 0 | 63 | 268 |
|
||||
| [cleonos/c/apps/spawn\_main.c](/cleonos/c/apps/spawn_main.c) | C | 76 | 0 | 20 | 96 |
|
||||
| [cleonos/c/apps/stats\_main.c](/cleonos/c/apps/stats_main.c) | C | 102 | 0 | 17 | 119 |
|
||||
| [cleonos/c/apps/tail\_main.c](/cleonos/c/apps/tail_main.c) | C | 190 | 0 | 54 | 244 |
|
||||
| [cleonos/c/apps/taskstat\_main.c](/cleonos/c/apps/taskstat_main.c) | C | 43 | 0 | 11 | 54 |
|
||||
| [cleonos/c/apps/touch\_main.c](/cleonos/c/apps/touch_main.c) | C | 58 | 0 | 16 | 74 |
|
||||
| [cleonos/c/apps/tty\_main.c](/cleonos/c/apps/tty_main.c) | C | 64 | 0 | 17 | 81 |
|
||||
| [cleonos/c/apps/ttydrv\_main.c](/cleonos/c/apps/ttydrv_main.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/uniq\_main.c](/cleonos/c/apps/uniq_main.c) | C | 168 | 0 | 48 | 216 |
|
||||
| [cleonos/c/apps/userstat\_main.c](/cleonos/c/apps/userstat_main.c) | C | 48 | 0 | 11 | 59 |
|
||||
| [cleonos/c/apps/wait\_main.c](/cleonos/c/apps/wait_main.c) | C | 68 | 0 | 17 | 85 |
|
||||
| [cleonos/c/apps/wavplay\_main.c](/cleonos/c/apps/wavplay_main.c) | C | 396 | 0 | 99 | 495 |
|
||||
| [cleonos/c/apps/wc\_main.c](/cleonos/c/apps/wc_main.c) | C | 164 | 0 | 45 | 209 |
|
||||
| [cleonos/c/apps/write\_main.c](/cleonos/c/apps/write_main.c) | C | 74 | 0 | 18 | 92 |
|
||||
| [cleonos/c/apps/yield\_main.c](/cleonos/c/apps/yield_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/include/cleonos\_rust\_bridge.h](/cleonos/c/include/cleonos_rust_bridge.h) | C++ | 6 | 0 | 4 | 10 |
|
||||
| [cleonos/c/include/cleonos\_syscall.h](/cleonos/c/include/cleonos_syscall.h) | C++ | 128 | 0 | 6 | 134 |
|
||||
| [cleonos/c/src/runtime.c](/cleonos/c/src/runtime.c) | C | 37 | 0 | 12 | 49 |
|
||||
| [cleonos/c/src/syscall.c](/cleonos/c/src/syscall.c) | C | 191 | 0 | 64 | 255 |
|
||||
| [cleonos/c/stub.c](/cleonos/c/stub.c) | C | 3 | 4 | 2 | 9 |
|
||||
| [cleonos/rust/src/lib.rs](/cleonos/rust/src/lib.rs) | Rust | 23 | 0 | 9 | 32 |
|
||||
| [clks/arch/aarch64/boot.c](/clks/arch/aarch64/boot.c) | C | 6 | 0 | 1 | 7 |
|
||||
| [clks/arch/x86\_64/boot.c](/clks/arch/x86_64/boot.c) | C | 6 | 0 | 1 | 7 |
|
||||
| [clks/arch/x86\_64/exec\_stack\_call.S](/clks/arch/x86_64/exec_stack_call.S) | Go Assembly | 22 | 0 | 8 | 30 |
|
||||
| [clks/arch/x86\_64/interrupt\_stubs.S](/clks/arch/x86_64/interrupt_stubs.S) | Go Assembly | 108 | 0 | 12 | 120 |
|
||||
| [clks/drivers/audio/pcspeaker.c](/clks/drivers/audio/pcspeaker.c) | C | 101 | 0 | 25 | 126 |
|
||||
| [clks/drivers/serial/serial.c](/clks/drivers/serial/serial.c) | C | 52 | 0 | 16 | 68 |
|
||||
| [clks/drivers/video/font8x8.c](/clks/drivers/video/font8x8.c) | C | 67 | 0 | 8 | 75 |
|
||||
| [clks/drivers/video/font8x8.h](/clks/drivers/video/font8x8.h) | C++ | 5 | 0 | 3 | 8 |
|
||||
| [clks/drivers/video/framebuffer.c](/clks/drivers/video/framebuffer.c) | C | 251 | 0 | 70 | 321 |
|
||||
| [clks/drivers/video/psf\_font.c](/clks/drivers/video/psf_font.c) | C | 230 | 0 | 56 | 286 |
|
||||
| [clks/drivers/video/psf\_font.h](/clks/drivers/video/psf_font.h) | C++ | 15 | 0 | 5 | 20 |
|
||||
| [clks/include/clks/audio.h](/clks/include/clks/audio.h) | C++ | 9 | 0 | 3 | 12 |
|
||||
| [clks/include/clks/boot.h](/clks/include/clks/boot.h) | C++ | 11 | 0 | 4 | 15 |
|
||||
| [clks/include/clks/compiler.h](/clks/include/clks/compiler.h) | C++ | 13 | 0 | 4 | 17 |
|
||||
| [clks/include/clks/cpu.h](/clks/include/clks/cpu.h) | C++ | 20 | 0 | 4 | 24 |
|
||||
| [clks/include/clks/desktop.h](/clks/include/clks/desktop.h) | C++ | 7 | 0 | 4 | 11 |
|
||||
| [clks/include/clks/driver.h](/clks/include/clks/driver.h) | C++ | 29 | 0 | 8 | 37 |
|
||||
| [clks/include/clks/elf64.h](/clks/include/clks/elf64.h) | C++ | 32 | 0 | 9 | 41 |
|
||||
| [clks/include/clks/elfrunner.h](/clks/include/clks/elfrunner.h) | C++ | 6 | 0 | 3 | 9 |
|
||||
| [clks/include/clks/exec.h](/clks/include/clks/exec.h) | C++ | 34 | 0 | 4 | 38 |
|
||||
| [clks/include/clks/framebuffer.h](/clks/include/clks/framebuffer.h) | C++ | 26 | 0 | 6 | 32 |
|
||||
| [clks/include/clks/fs.h](/clks/include/clks/fs.h) | C++ | 23 | 0 | 7 | 30 |
|
||||
| [clks/include/clks/heap.h](/clks/include/clks/heap.h) | C++ | 15 | 0 | 4 | 19 |
|
||||
| [clks/include/clks/interrupts.h](/clks/include/clks/interrupts.h) | C++ | 6 | 0 | 3 | 9 |
|
||||
| [clks/include/clks/kelf.h](/clks/include/clks/kelf.h) | C++ | 9 | 0 | 5 | 14 |
|
||||
| [clks/include/clks/kernel.h](/clks/include/clks/kernel.h) | C++ | 4 | 0 | 2 | 6 |
|
||||
| [clks/include/clks/keyboard.h](/clks/include/clks/keyboard.h) | C++ | 27 | 0 | 6 | 33 |
|
||||
| [clks/include/clks/limine.h](/clks/include/clks/limine.h) | C++ | 132 | 0 | 24 | 156 |
|
||||
| [clks/include/clks/log.h](/clks/include/clks/log.h) | C++ | 14 | 0 | 5 | 19 |
|
||||
| [clks/include/clks/mouse.h](/clks/include/clks/mouse.h) | C++ | 20 | 0 | 6 | 26 |
|
||||
| [clks/include/clks/panic.h](/clks/include/clks/panic.h) | C++ | 7 | 0 | 3 | 10 |
|
||||
| [clks/include/clks/pmm.h](/clks/include/clks/pmm.h) | C++ | 16 | 0 | 5 | 21 |
|
||||
| [clks/include/clks/ramdisk.h](/clks/include/clks/ramdisk.h) | C++ | 17 | 0 | 8 | 25 |
|
||||
| [clks/include/clks/scheduler.h](/clks/include/clks/scheduler.h) | C++ | 18 | 0 | 5 | 23 |
|
||||
| [clks/include/clks/serial.h](/clks/include/clks/serial.h) | C++ | 6 | 0 | 2 | 8 |
|
||||
| [clks/include/clks/service.h](/clks/include/clks/service.h) | C++ | 31 | 0 | 8 | 39 |
|
||||
| [clks/include/clks/shell.h](/clks/include/clks/shell.h) | C++ | 7 | 0 | 3 | 10 |
|
||||
| [clks/include/clks/string.h](/clks/include/clks/string.h) | C++ | 9 | 0 | 3 | 12 |
|
||||
| [clks/include/clks/syscall.h](/clks/include/clks/syscall.h) | C++ | 68 | 0 | 5 | 73 |
|
||||
| [clks/include/clks/task.h](/clks/include/clks/task.h) | C++ | 24 | 0 | 7 | 31 |
|
||||
| [clks/include/clks/tty.h](/clks/include/clks/tty.h) | C++ | 14 | 0 | 4 | 18 |
|
||||
| [clks/include/clks/types.h](/clks/include/clks/types.h) | C++ | 17 | 0 | 6 | 23 |
|
||||
| [clks/include/clks/userland.h](/clks/include/clks/userland.h) | C++ | 12 | 0 | 4 | 16 |
|
||||
| [clks/kernel/desktop.c](/clks/kernel/desktop.c) | C | 321 | 0 | 86 | 407 |
|
||||
| [clks/kernel/driver.c](/clks/kernel/driver.c) | C | 169 | 0 | 49 | 218 |
|
||||
| [clks/kernel/elf64.c](/clks/kernel/elf64.c) | C | 239 | 0 | 73 | 312 |
|
||||
| [clks/kernel/elfrunner.c](/clks/kernel/elfrunner.c) | C | 30 | 0 | 8 | 38 |
|
||||
| [clks/kernel/exec.c](/clks/kernel/exec.c) | C | 854 | 0 | 237 | 1,091 |
|
||||
| [clks/kernel/fs.c](/clks/kernel/fs.c) | C | 698 | 0 | 220 | 918 |
|
||||
| [clks/kernel/heap.c](/clks/kernel/heap.c) | C | 134 | 0 | 42 | 176 |
|
||||
| [clks/kernel/interrupts.c](/clks/kernel/interrupts.c) | C | 311 | 0 | 44 | 355 |
|
||||
| [clks/kernel/kelf.c](/clks/kernel/kelf.c) | C | 203 | 1 | 53 | 257 |
|
||||
| [clks/kernel/keyboard.c](/clks/kernel/keyboard.c) | C | 311 | 0 | 79 | 390 |
|
||||
| [clks/kernel/kmain.c](/clks/kernel/kmain.c) | C | 200 | 1 | 52 | 253 |
|
||||
| [clks/kernel/limine\_requests.c](/clks/kernel/limine_requests.c) | C | 76 | 0 | 26 | 102 |
|
||||
| [clks/kernel/log.c](/clks/kernel/log.c) | C | 123 | 0 | 33 | 156 |
|
||||
| [clks/kernel/mouse.c](/clks/kernel/mouse.c) | C | 246 | 0 | 63 | 309 |
|
||||
| [clks/kernel/panic.c](/clks/kernel/panic.c) | C | 179 | 0 | 60 | 239 |
|
||||
| [clks/kernel/pmm.c](/clks/kernel/pmm.c) | C | 82 | 0 | 23 | 105 |
|
||||
| [clks/kernel/ramdisk.c](/clks/kernel/ramdisk.c) | C | 172 | 0 | 50 | 222 |
|
||||
| [clks/kernel/scheduler.c](/clks/kernel/scheduler.c) | C | 136 | 0 | 44 | 180 |
|
||||
| [clks/kernel/service.c](/clks/kernel/service.c) | C | 113 | 0 | 34 | 147 |
|
||||
| [clks/kernel/shell.c](/clks/kernel/shell.c) | C | 1,249 | 0 | 317 | 1,566 |
|
||||
| [clks/kernel/syscall.c](/clks/kernel/syscall.c) | C | 619 | 0 | 140 | 759 |
|
||||
| [clks/kernel/tty.c](/clks/kernel/tty.c) | C | 1,115 | 0 | 275 | 1,390 |
|
||||
| [clks/kernel/userland.c](/clks/kernel/userland.c) | C | 124 | 0 | 35 | 159 |
|
||||
| [clks/lib/libc\_compat.c](/clks/lib/libc_compat.c) | C | 25 | 0 | 7 | 32 |
|
||||
| [clks/lib/string.c](/clks/lib/string.c) | C | 54 | 0 | 16 | 70 |
|
||||
| [clks/rust/src/lib.rs](/clks/rust/src/lib.rs) | Rust | 21 | 0 | 6 | 27 |
|
||||
| [cmake/check\_tools.cmake](/cmake/check_tools.cmake) | CMake | 32 | 0 | 6 | 38 |
|
||||
| [cmake/log.cmake](/cmake/log.cmake) | CMake | 30 | 0 | 6 | 36 |
|
||||
| [cmake/log\_emit.cmake](/cmake/log_emit.cmake) | CMake | 23 | 0 | 6 | 29 |
|
||||
| [cmake/setup\_limine.cmake](/cmake/setup_limine.cmake) | CMake | 100 | 0 | 18 | 118 |
|
||||
| [configs/limine.conf](/configs/limine.conf) | Properties | 6 | 0 | 1 | 7 |
|
||||
| [docs/README.md](/docs/README.md) | Markdown | 31 | 0 | 4 | 35 |
|
||||
| [docs/stage1.md](/docs/stage1.md) | Markdown | 41 | 0 | 5 | 46 |
|
||||
| [docs/stage10.md](/docs/stage10.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage11.md](/docs/stage11.md) | Markdown | 36 | 0 | 5 | 41 |
|
||||
| [docs/stage12.md](/docs/stage12.md) | Markdown | 40 | 0 | 6 | 46 |
|
||||
| [docs/stage13.md](/docs/stage13.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage14.md](/docs/stage14.md) | Markdown | 44 | 0 | 8 | 52 |
|
||||
| [docs/stage15.md](/docs/stage15.md) | Markdown | 47 | 0 | 7 | 54 |
|
||||
| [docs/stage2.md](/docs/stage2.md) | Markdown | 30 | 0 | 5 | 35 |
|
||||
| [docs/stage20.md](/docs/stage20.md) | Markdown | 46 | 0 | 6 | 52 |
|
||||
| [docs/stage21.md](/docs/stage21.md) | Markdown | 72 | 0 | 7 | 79 |
|
||||
| [docs/stage22.md](/docs/stage22.md) | Markdown | 68 | 0 | 7 | 75 |
|
||||
| [docs/stage23.md](/docs/stage23.md) | Markdown | 41 | 0 | 6 | 47 |
|
||||
| [docs/stage24.md](/docs/stage24.md) | Markdown | 42 | 0 | 7 | 49 |
|
||||
| [docs/stage25.md](/docs/stage25.md) | Markdown | 58 | 0 | 7 | 65 |
|
||||
| [docs/stage26.md](/docs/stage26.md) | Markdown | 32 | 0 | 7 | 39 |
|
||||
| [docs/stage27.md](/docs/stage27.md) | Markdown | 32 | 0 | 7 | 39 |
|
||||
| [docs/stage28.md](/docs/stage28.md) | Markdown | 37 | 0 | 7 | 44 |
|
||||
| [docs/stage29.md](/docs/stage29.md) | Markdown | 33 | 0 | 7 | 40 |
|
||||
| [docs/stage3.md](/docs/stage3.md) | Markdown | 29 | 0 | 5 | 34 |
|
||||
| [docs/stage4.md](/docs/stage4.md) | Markdown | 30 | 0 | 5 | 35 |
|
||||
| [docs/stage5.md](/docs/stage5.md) | Markdown | 29 | 0 | 5 | 34 |
|
||||
| [docs/stage6.md](/docs/stage6.md) | Markdown | 30 | 0 | 6 | 36 |
|
||||
| [docs/stage7.md](/docs/stage7.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage8.md](/docs/stage8.md) | Markdown | 31 | 0 | 6 | 37 |
|
||||
| [docs/stage9.md](/docs/stage9.md) | Markdown | 31 | 0 | 6 | 37 |
|
||||
| [docs/syscall.md](/docs/syscall.md) | Markdown | 328 | 0 | 154 | 482 |
|
||||
| [ramdisk/shell/init.cmd](/ramdisk/shell/init.cmd) | Batch | 4 | 0 | 2 | 6 |
|
||||
| [scripts/gen-tty-psf.ps1](/scripts/gen-tty-psf.ps1) | PowerShell | 171 | 2 | 42 | 215 |
|
||||
| [wine/README.md](/wine/README.md) | Markdown | 49 | 0 | 19 | 68 |
|
||||
| [wine/cleonos\_wine.py](/wine/cleonos_wine.py) | Python | 3 | 1 | 3 | 7 |
|
||||
| [wine/cleonos\_wine\_lib/\_\_init\_\_.py](/wine/cleonos_wine_lib/__init__.py) | Python | 4 | 0 | 1 | 5 |
|
||||
| [wine/cleonos\_wine\_lib/cli.py](/wine/cleonos_wine_lib/cli.py) | Python | 44 | 0 | 10 | 54 |
|
||||
| [wine/cleonos\_wine\_lib/constants.py](/wine/cleonos_wine_lib/constants.py) | Python | 76 | 1 | 11 | 88 |
|
||||
| [wine/cleonos\_wine\_lib/input\_pump.py](/wine/cleonos_wine_lib/input_pump.py) | Python | 82 | 0 | 17 | 99 |
|
||||
| [wine/cleonos\_wine\_lib/platform.py](/wine/cleonos_wine_lib/platform.py) | Python | 55 | 0 | 5 | 60 |
|
||||
| [wine/cleonos\_wine\_lib/runner.py](/wine/cleonos_wine_lib/runner.py) | Python | 990 | 0 | 175 | 1,165 |
|
||||
| [wine/cleonos\_wine\_lib/state.py](/wine/cleonos_wine_lib/state.py) | Python | 164 | 0 | 40 | 204 |
|
||||
| [wine/requirements.txt](/wine/requirements.txt) | pip requirements | 1 | 0 | 1 | 2 |
|
||||
|
||||
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
95
.VSCodeCounter/2026-04-17_16-44-24/diff-details.md
Normal file
95
.VSCodeCounter/2026-04-17_16-44-24/diff-details.md
Normal file
@@ -0,0 +1,95 @@
|
||||
# Diff Details
|
||||
|
||||
Date : 2026-04-17 16:44:24
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 80 files, 8302 codes, 1 comments, 2069 blanks, all 10372 lines
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
||||
|
||||
## Files
|
||||
| filename | language | code | comment | blank | total |
|
||||
| :--- | :--- | ---: | ---: | ---: | ---: |
|
||||
| [.github/workflows/build-os.yml](/.github/workflows/build-os.yml) | YAML | 48 | 0 | 10 | 58 |
|
||||
| [CMakeLists.txt](/CMakeLists.txt) | CMake | 8 | 0 | 2 | 10 |
|
||||
| [README.md](/README.md) | Markdown | 92 | 0 | 34 | 126 |
|
||||
| [README.zh-CN.md](/README.zh-CN.md) | Markdown | 92 | 0 | 34 | 126 |
|
||||
| [cleonos/c/apps/ansi\_main.c](/cleonos/c/apps/ansi_main.c) | C | 39 | 0 | 8 | 47 |
|
||||
| [cleonos/c/apps/ansitest\_main.c](/cleonos/c/apps/ansitest_main.c) | C | 142 | 0 | 35 | 177 |
|
||||
| [cleonos/c/apps/append\_main.c](/cleonos/c/apps/append_main.c) | C | 70 | 0 | 15 | 85 |
|
||||
| [cleonos/c/apps/args\_main.c](/cleonos/c/apps/args_main.c) | C | 49 | 0 | 13 | 62 |
|
||||
| [cleonos/c/apps/cat\_main.c](/cleonos/c/apps/cat_main.c) | C | 79 | 0 | 21 | 100 |
|
||||
| [cleonos/c/apps/cd\_main.c](/cleonos/c/apps/cd_main.c) | C | 50 | 0 | 12 | 62 |
|
||||
| [cleonos/c/apps/clear\_main.c](/cleonos/c/apps/clear_main.c) | C | 35 | 0 | 8 | 43 |
|
||||
| [cleonos/c/apps/cmd\_runtime.c](/cleonos/c/apps/cmd_runtime.c) | C | 446 | 0 | 143 | 589 |
|
||||
| [cleonos/c/apps/cmd\_runtime.h](/cleonos/c/apps/cmd_runtime.h) | C++ | 80 | 0 | 19 | 99 |
|
||||
| [cleonos/c/apps/cp\_main.c](/cleonos/c/apps/cp_main.c) | C | 91 | 0 | 23 | 114 |
|
||||
| [cleonos/c/apps/cut\_main.c](/cleonos/c/apps/cut_main.c) | C | 214 | 1 | 55 | 270 |
|
||||
| [cleonos/c/apps/dmesg\_main.c](/cleonos/c/apps/dmesg_main.c) | C | 60 | 0 | 15 | 75 |
|
||||
| [cleonos/c/apps/exec\_main.c](/cleonos/c/apps/exec_main.c) | C | 83 | 0 | 19 | 102 |
|
||||
| [cleonos/c/apps/exit\_main.c](/cleonos/c/apps/exit_main.c) | C | 50 | 0 | 11 | 61 |
|
||||
| [cleonos/c/apps/fastfetch\_main.c](/cleonos/c/apps/fastfetch_main.c) | C | 180 | 0 | 34 | 214 |
|
||||
| [cleonos/c/apps/fsstat\_main.c](/cleonos/c/apps/fsstat_main.c) | C | 41 | 0 | 8 | 49 |
|
||||
| [cleonos/c/apps/grep\_main.c](/cleonos/c/apps/grep_main.c) | C | 195 | 0 | 54 | 249 |
|
||||
| [cleonos/c/apps/head\_main.c](/cleonos/c/apps/head_main.c) | C | 164 | 0 | 47 | 211 |
|
||||
| [cleonos/c/apps/help\_main.c](/cleonos/c/apps/help_main.c) | C | 71 | 0 | 7 | 78 |
|
||||
| [cleonos/c/apps/kbdstat\_main.c](/cleonos/c/apps/kbdstat_main.c) | C | 40 | 0 | 8 | 48 |
|
||||
| [cleonos/c/apps/ls\_main.c](/cleonos/c/apps/ls_main.c) | C | 258 | 0 | 73 | 331 |
|
||||
| [cleonos/c/apps/memstat\_main.c](/cleonos/c/apps/memstat_main.c) | C | 39 | 0 | 8 | 47 |
|
||||
| [cleonos/c/apps/mkdir\_main.c](/cleonos/c/apps/mkdir_main.c) | C | 53 | 0 | 13 | 66 |
|
||||
| [cleonos/c/apps/mv\_main.c](/cleonos/c/apps/mv_main.c) | C | 98 | 0 | 25 | 123 |
|
||||
| [cleonos/c/apps/pid\_main.c](/cleonos/c/apps/pid_main.c) | C | 35 | 0 | 8 | 43 |
|
||||
| [cleonos/c/apps/pwd\_main.c](/cleonos/c/apps/pwd_main.c) | C | 35 | 0 | 8 | 43 |
|
||||
| [cleonos/c/apps/restart\_main.c](/cleonos/c/apps/restart_main.c) | C | 36 | 0 | 8 | 44 |
|
||||
| [cleonos/c/apps/rm\_main.c](/cleonos/c/apps/rm_main.c) | C | 53 | 0 | 13 | 66 |
|
||||
| [cleonos/c/apps/shell/shell\_cmd.c](/cleonos/c/apps/shell/shell_cmd.c) | C | 1,535 | 0 | 392 | 1,927 |
|
||||
| [cleonos/c/apps/shell/shell\_external.c](/cleonos/c/apps/shell/shell_external.c) | C | -57 | 0 | -20 | -77 |
|
||||
| [cleonos/c/apps/shell/shell\_input.c](/cleonos/c/apps/shell/shell_input.c) | C | 259 | 0 | 64 | 323 |
|
||||
| [cleonos/c/apps/shell/shell\_internal.h](/cleonos/c/apps/shell/shell_internal.h) | C++ | 8 | 0 | 1 | 9 |
|
||||
| [cleonos/c/apps/shell/shell\_util.c](/cleonos/c/apps/shell/shell_util.c) | C | 72 | 0 | 20 | 92 |
|
||||
| [cleonos/c/apps/shstat\_main.c](/cleonos/c/apps/shstat_main.c) | C | 41 | 0 | 8 | 49 |
|
||||
| [cleonos/c/apps/shutdown\_main.c](/cleonos/c/apps/shutdown_main.c) | C | 36 | 0 | 8 | 44 |
|
||||
| [cleonos/c/apps/sleep\_main.c](/cleonos/c/apps/sleep_main.c) | C | 48 | 0 | 11 | 59 |
|
||||
| [cleonos/c/apps/sort\_main.c](/cleonos/c/apps/sort_main.c) | C | 205 | 0 | 63 | 268 |
|
||||
| [cleonos/c/apps/spawn\_main.c](/cleonos/c/apps/spawn_main.c) | C | 72 | 0 | 17 | 89 |
|
||||
| [cleonos/c/apps/stats\_main.c](/cleonos/c/apps/stats_main.c) | C | 98 | 0 | 14 | 112 |
|
||||
| [cleonos/c/apps/tail\_main.c](/cleonos/c/apps/tail_main.c) | C | 190 | 0 | 54 | 244 |
|
||||
| [cleonos/c/apps/taskstat\_main.c](/cleonos/c/apps/taskstat_main.c) | C | 39 | 0 | 8 | 47 |
|
||||
| [cleonos/c/apps/touch\_main.c](/cleonos/c/apps/touch_main.c) | C | 54 | 0 | 13 | 67 |
|
||||
| [cleonos/c/apps/tty\_main.c](/cleonos/c/apps/tty_main.c) | C | 60 | 0 | 14 | 74 |
|
||||
| [cleonos/c/apps/uniq\_main.c](/cleonos/c/apps/uniq_main.c) | C | 168 | 0 | 48 | 216 |
|
||||
| [cleonos/c/apps/userstat\_main.c](/cleonos/c/apps/userstat_main.c) | C | 44 | 0 | 8 | 52 |
|
||||
| [cleonos/c/apps/wait\_main.c](/cleonos/c/apps/wait_main.c) | C | 64 | 0 | 14 | 78 |
|
||||
| [cleonos/c/apps/wavplay\_main.c](/cleonos/c/apps/wavplay_main.c) | C | 396 | 0 | 99 | 495 |
|
||||
| [cleonos/c/apps/wc\_main.c](/cleonos/c/apps/wc_main.c) | C | 164 | 0 | 45 | 209 |
|
||||
| [cleonos/c/apps/write\_main.c](/cleonos/c/apps/write_main.c) | C | 70 | 0 | 15 | 85 |
|
||||
| [cleonos/c/apps/yield\_main.c](/cleonos/c/apps/yield_main.c) | C | 35 | 0 | 8 | 43 |
|
||||
| [cleonos/c/include/cleonos\_syscall.h](/cleonos/c/include/cleonos_syscall.h) | C++ | 26 | 0 | 0 | 26 |
|
||||
| [cleonos/c/src/runtime.c](/cleonos/c/src/runtime.c) | C | 29 | 0 | 7 | 36 |
|
||||
| [cleonos/c/src/syscall.c](/cleonos/c/src/syscall.c) | C | 39 | 0 | 14 | 53 |
|
||||
| [clks/arch/x86\_64/exec\_stack\_call.S](/clks/arch/x86_64/exec_stack_call.S) | Go Assembly | 8 | 0 | 2 | 10 |
|
||||
| [clks/drivers/audio/pcspeaker.c](/clks/drivers/audio/pcspeaker.c) | C | 101 | 0 | 25 | 126 |
|
||||
| [clks/drivers/video/framebuffer.c](/clks/drivers/video/framebuffer.c) | C | 21 | 0 | 6 | 27 |
|
||||
| [clks/include/clks/audio.h](/clks/include/clks/audio.h) | C++ | 9 | 0 | 3 | 12 |
|
||||
| [clks/include/clks/driver.h](/clks/include/clks/driver.h) | C++ | 1 | 0 | 0 | 1 |
|
||||
| [clks/include/clks/exec.h](/clks/include/clks/exec.h) | C++ | 16 | 0 | 0 | 16 |
|
||||
| [clks/include/clks/framebuffer.h](/clks/include/clks/framebuffer.h) | C++ | 3 | 0 | 1 | 4 |
|
||||
| [clks/include/clks/keyboard.h](/clks/include/clks/keyboard.h) | C++ | 7 | 0 | 1 | 8 |
|
||||
| [clks/include/clks/syscall.h](/clks/include/clks/syscall.h) | C++ | 13 | 0 | 1 | 14 |
|
||||
| [clks/kernel/driver.c](/clks/kernel/driver.c) | C | 6 | 0 | 1 | 7 |
|
||||
| [clks/kernel/exec.c](/clks/kernel/exec.c) | C | 299 | 0 | 71 | 370 |
|
||||
| [clks/kernel/interrupts.c](/clks/kernel/interrupts.c) | C | 9 | 0 | 1 | 10 |
|
||||
| [clks/kernel/keyboard.c](/clks/kernel/keyboard.c) | C | 52 | 0 | 15 | 67 |
|
||||
| [clks/kernel/kmain.c](/clks/kernel/kmain.c) | C | 2 | 0 | 0 | 2 |
|
||||
| [clks/kernel/syscall.c](/clks/kernel/syscall.c) | C | 127 | 0 | 30 | 157 |
|
||||
| [clks/kernel/tty.c](/clks/kernel/tty.c) | C | 486 | 0 | 108 | 594 |
|
||||
| [docs/stage27.md](/docs/stage27.md) | Markdown | 4 | 0 | 0 | 4 |
|
||||
| [docs/syscall.md](/docs/syscall.md) | Markdown | 77 | 0 | 30 | 107 |
|
||||
| [wine/README.md](/wine/README.md) | Markdown | 12 | 0 | 5 | 17 |
|
||||
| [wine/cleonos\_wine\_lib/constants.py](/wine/cleonos_wine_lib/constants.py) | Python | 13 | 0 | 1 | 14 |
|
||||
| [wine/cleonos\_wine\_lib/platform.py](/wine/cleonos_wine_lib/platform.py) | Python | 18 | 0 | 1 | 19 |
|
||||
| [wine/cleonos\_wine\_lib/runner.py](/wine/cleonos_wine_lib/runner.py) | Python | 237 | 0 | 38 | 275 |
|
||||
| [wine/cleonos\_wine\_lib/state.py](/wine/cleonos_wine_lib/state.py) | Python | 60 | 0 | 13 | 73 |
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
||||
82
.VSCodeCounter/2026-04-17_16-44-24/diff.csv
Normal file
82
.VSCodeCounter/2026-04-17_16-44-24/diff.csv
Normal file
@@ -0,0 +1,82 @@
|
||||
"filename", "language", "Python", "YAML", "Markdown", "CMake", "C", "C++", "Go Assembly", "comment", "blank", "total"
|
||||
"d:\Projects\C\cleonos\.github\workflows\build-os.yml", "YAML", 0, 48, 0, 0, 0, 0, 0, 0, 10, 58
|
||||
"d:\Projects\C\cleonos\CMakeLists.txt", "CMake", 0, 0, 0, 8, 0, 0, 0, 0, 2, 10
|
||||
"d:\Projects\C\cleonos\README.md", "Markdown", 0, 0, 92, 0, 0, 0, 0, 0, 34, 126
|
||||
"d:\Projects\C\cleonos\README.zh-CN.md", "Markdown", 0, 0, 92, 0, 0, 0, 0, 0, 34, 126
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ansi_main.c", "C", 0, 0, 0, 0, 39, 0, 0, 0, 8, 47
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ansitest_main.c", "C", 0, 0, 0, 0, 142, 0, 0, 0, 35, 177
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\append_main.c", "C", 0, 0, 0, 0, 70, 0, 0, 0, 15, 85
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\args_main.c", "C", 0, 0, 0, 0, 49, 0, 0, 0, 13, 62
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cat_main.c", "C", 0, 0, 0, 0, 79, 0, 0, 0, 21, 100
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cd_main.c", "C", 0, 0, 0, 0, 50, 0, 0, 0, 12, 62
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\clear_main.c", "C", 0, 0, 0, 0, 35, 0, 0, 0, 8, 43
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.c", "C", 0, 0, 0, 0, 446, 0, 0, 0, 143, 589
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.h", "C++", 0, 0, 0, 0, 0, 80, 0, 0, 19, 99
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cp_main.c", "C", 0, 0, 0, 0, 91, 0, 0, 0, 23, 114
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cut_main.c", "C", 0, 0, 0, 0, 214, 0, 0, 1, 55, 270
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\dmesg_main.c", "C", 0, 0, 0, 0, 60, 0, 0, 0, 15, 75
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\exec_main.c", "C", 0, 0, 0, 0, 83, 0, 0, 0, 19, 102
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\exit_main.c", "C", 0, 0, 0, 0, 50, 0, 0, 0, 11, 61
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fastfetch_main.c", "C", 0, 0, 0, 0, 180, 0, 0, 0, 34, 214
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fsstat_main.c", "C", 0, 0, 0, 0, 41, 0, 0, 0, 8, 49
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\grep_main.c", "C", 0, 0, 0, 0, 195, 0, 0, 0, 54, 249
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\head_main.c", "C", 0, 0, 0, 0, 164, 0, 0, 0, 47, 211
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\help_main.c", "C", 0, 0, 0, 0, 71, 0, 0, 0, 7, 78
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\kbdstat_main.c", "C", 0, 0, 0, 0, 40, 0, 0, 0, 8, 48
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ls_main.c", "C", 0, 0, 0, 0, 258, 0, 0, 0, 73, 331
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memstat_main.c", "C", 0, 0, 0, 0, 39, 0, 0, 0, 8, 47
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\mkdir_main.c", "C", 0, 0, 0, 0, 53, 0, 0, 0, 13, 66
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\mv_main.c", "C", 0, 0, 0, 0, 98, 0, 0, 0, 25, 123
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\pid_main.c", "C", 0, 0, 0, 0, 35, 0, 0, 0, 8, 43
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\pwd_main.c", "C", 0, 0, 0, 0, 35, 0, 0, 0, 8, 43
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\restart_main.c", "C", 0, 0, 0, 0, 36, 0, 0, 0, 8, 44
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\rm_main.c", "C", 0, 0, 0, 0, 53, 0, 0, 0, 13, 66
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c", "C", 0, 0, 0, 0, 1535, 0, 0, 0, 392, 1927
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_external.c", "C", 0, 0, 0, 0, -57, 0, 0, 0, -20, -77
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c", "C", 0, 0, 0, 0, 259, 0, 0, 0, 64, 323
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_internal.h", "C++", 0, 0, 0, 0, 0, 8, 0, 0, 1, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_util.c", "C", 0, 0, 0, 0, 72, 0, 0, 0, 20, 92
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shstat_main.c", "C", 0, 0, 0, 0, 41, 0, 0, 0, 8, 49
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shutdown_main.c", "C", 0, 0, 0, 0, 36, 0, 0, 0, 8, 44
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\sleep_main.c", "C", 0, 0, 0, 0, 48, 0, 0, 0, 11, 59
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\sort_main.c", "C", 0, 0, 0, 0, 205, 0, 0, 0, 63, 268
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\spawn_main.c", "C", 0, 0, 0, 0, 72, 0, 0, 0, 17, 89
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\stats_main.c", "C", 0, 0, 0, 0, 98, 0, 0, 0, 14, 112
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\tail_main.c", "C", 0, 0, 0, 0, 190, 0, 0, 0, 54, 244
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\taskstat_main.c", "C", 0, 0, 0, 0, 39, 0, 0, 0, 8, 47
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\touch_main.c", "C", 0, 0, 0, 0, 54, 0, 0, 0, 13, 67
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\tty_main.c", "C", 0, 0, 0, 0, 60, 0, 0, 0, 14, 74
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\uniq_main.c", "C", 0, 0, 0, 0, 168, 0, 0, 0, 48, 216
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\userstat_main.c", "C", 0, 0, 0, 0, 44, 0, 0, 0, 8, 52
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wait_main.c", "C", 0, 0, 0, 0, 64, 0, 0, 0, 14, 78
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wavplay_main.c", "C", 0, 0, 0, 0, 396, 0, 0, 0, 99, 495
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wc_main.c", "C", 0, 0, 0, 0, 164, 0, 0, 0, 45, 209
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\write_main.c", "C", 0, 0, 0, 0, 70, 0, 0, 0, 15, 85
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\yield_main.c", "C", 0, 0, 0, 0, 35, 0, 0, 0, 8, 43
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h", "C++", 0, 0, 0, 0, 0, 26, 0, 0, 0, 26
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\runtime.c", "C", 0, 0, 0, 0, 29, 0, 0, 0, 7, 36
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\syscall.c", "C", 0, 0, 0, 0, 39, 0, 0, 0, 14, 53
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\exec_stack_call.S", "Go Assembly", 0, 0, 0, 0, 0, 0, 8, 0, 2, 10
|
||||
"d:\Projects\C\cleonos\clks\drivers\audio\pcspeaker.c", "C", 0, 0, 0, 0, 101, 0, 0, 0, 25, 126
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\framebuffer.c", "C", 0, 0, 0, 0, 21, 0, 0, 0, 6, 27
|
||||
"d:\Projects\C\cleonos\clks\include\clks\audio.h", "C++", 0, 0, 0, 0, 0, 9, 0, 0, 3, 12
|
||||
"d:\Projects\C\cleonos\clks\include\clks\driver.h", "C++", 0, 0, 0, 0, 0, 1, 0, 0, 0, 1
|
||||
"d:\Projects\C\cleonos\clks\include\clks\exec.h", "C++", 0, 0, 0, 0, 0, 16, 0, 0, 0, 16
|
||||
"d:\Projects\C\cleonos\clks\include\clks\framebuffer.h", "C++", 0, 0, 0, 0, 0, 3, 0, 0, 1, 4
|
||||
"d:\Projects\C\cleonos\clks\include\clks\keyboard.h", "C++", 0, 0, 0, 0, 0, 7, 0, 0, 1, 8
|
||||
"d:\Projects\C\cleonos\clks\include\clks\syscall.h", "C++", 0, 0, 0, 0, 0, 13, 0, 0, 1, 14
|
||||
"d:\Projects\C\cleonos\clks\kernel\driver.c", "C", 0, 0, 0, 0, 6, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\clks\kernel\exec.c", "C", 0, 0, 0, 0, 299, 0, 0, 0, 71, 370
|
||||
"d:\Projects\C\cleonos\clks\kernel\interrupts.c", "C", 0, 0, 0, 0, 9, 0, 0, 0, 1, 10
|
||||
"d:\Projects\C\cleonos\clks\kernel\keyboard.c", "C", 0, 0, 0, 0, 52, 0, 0, 0, 15, 67
|
||||
"d:\Projects\C\cleonos\clks\kernel\kmain.c", "C", 0, 0, 0, 0, 2, 0, 0, 0, 0, 2
|
||||
"d:\Projects\C\cleonos\clks\kernel\syscall.c", "C", 0, 0, 0, 0, 127, 0, 0, 0, 30, 157
|
||||
"d:\Projects\C\cleonos\clks\kernel\tty.c", "C", 0, 0, 0, 0, 486, 0, 0, 0, 108, 594
|
||||
"d:\Projects\C\cleonos\docs\stage27.md", "Markdown", 0, 0, 4, 0, 0, 0, 0, 0, 0, 4
|
||||
"d:\Projects\C\cleonos\docs\syscall.md", "Markdown", 0, 0, 77, 0, 0, 0, 0, 0, 30, 107
|
||||
"d:\Projects\C\cleonos\wine\README.md", "Markdown", 0, 0, 12, 0, 0, 0, 0, 0, 5, 17
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\constants.py", "Python", 13, 0, 0, 0, 0, 0, 0, 0, 1, 14
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\platform.py", "Python", 18, 0, 0, 0, 0, 0, 0, 0, 1, 19
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\runner.py", "Python", 237, 0, 0, 0, 0, 0, 0, 0, 38, 275
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\state.py", "Python", 60, 0, 0, 0, 0, 0, 0, 0, 13, 73
|
||||
"Total", "-", 328, 48, 277, 8, 7470, 163, 8, 1, 2069, 10372
|
||||
|
50
.VSCodeCounter/2026-04-17_16-44-24/diff.md
Normal file
50
.VSCodeCounter/2026-04-17_16-44-24/diff.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Diff Summary
|
||||
|
||||
Date : 2026-04-17 16:44:24
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 80 files, 8302 codes, 1 comments, 2069 blanks, all 10372 lines
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
||||
|
||||
## Languages
|
||||
| language | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| C | 59 | 7,470 | 1 | 1,873 | 9,344 |
|
||||
| Python | 4 | 328 | 0 | 53 | 381 |
|
||||
| Markdown | 5 | 277 | 0 | 103 | 380 |
|
||||
| C++ | 9 | 163 | 0 | 26 | 189 |
|
||||
| YAML | 1 | 48 | 0 | 10 | 58 |
|
||||
| CMake | 1 | 8 | 0 | 2 | 10 |
|
||||
| Go Assembly | 1 | 8 | 0 | 2 | 10 |
|
||||
|
||||
## Directories
|
||||
| path | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| . | 80 | 8,302 | 1 | 2,069 | 10,372 |
|
||||
| . (Files) | 3 | 192 | 0 | 70 | 262 |
|
||||
| .github | 1 | 48 | 0 | 10 | 58 |
|
||||
| .github\\workflows | 1 | 48 | 0 | 10 | 58 |
|
||||
| cleonos | 53 | 6,481 | 1 | 1,636 | 8,118 |
|
||||
| cleonos\\c | 53 | 6,481 | 1 | 1,636 | 8,118 |
|
||||
| cleonos\\c\\apps | 50 | 6,387 | 1 | 1,615 | 8,003 |
|
||||
| cleonos\\c\\apps (Files) | 45 | 4,570 | 1 | 1,158 | 5,729 |
|
||||
| cleonos\\c\\apps\\shell | 5 | 1,817 | 0 | 457 | 2,274 |
|
||||
| cleonos\\c\\include | 1 | 26 | 0 | 0 | 26 |
|
||||
| cleonos\\c\\src | 2 | 68 | 0 | 21 | 89 |
|
||||
| clks | 16 | 1,160 | 0 | 265 | 1,425 |
|
||||
| clks\\arch | 1 | 8 | 0 | 2 | 10 |
|
||||
| clks\\arch\\x86_64 | 1 | 8 | 0 | 2 | 10 |
|
||||
| clks\\drivers | 2 | 122 | 0 | 31 | 153 |
|
||||
| clks\\drivers\\audio | 1 | 101 | 0 | 25 | 126 |
|
||||
| clks\\drivers\\video | 1 | 21 | 0 | 6 | 27 |
|
||||
| clks\\include | 6 | 49 | 0 | 6 | 55 |
|
||||
| clks\\include\\clks | 6 | 49 | 0 | 6 | 55 |
|
||||
| clks\\kernel | 7 | 981 | 0 | 226 | 1,207 |
|
||||
| docs | 2 | 81 | 0 | 30 | 111 |
|
||||
| wine | 5 | 340 | 0 | 58 | 398 |
|
||||
| wine (Files) | 1 | 12 | 0 | 5 | 17 |
|
||||
| wine\\cleonos_wine_lib | 4 | 328 | 0 | 53 | 381 |
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
||||
133
.VSCodeCounter/2026-04-17_16-44-24/diff.txt
Normal file
133
.VSCodeCounter/2026-04-17_16-44-24/diff.txt
Normal file
@@ -0,0 +1,133 @@
|
||||
Date : 2026-04-17 16:44:24
|
||||
Directory : d:\Projects\C\cleonos
|
||||
Total : 80 files, 8302 codes, 1 comments, 2069 blanks, all 10372 lines
|
||||
|
||||
Languages
|
||||
+-------------+------------+------------+------------+------------+------------+
|
||||
| language | files | code | comment | blank | total |
|
||||
+-------------+------------+------------+------------+------------+------------+
|
||||
| C | 59 | 7,470 | 1 | 1,873 | 9,344 |
|
||||
| Python | 4 | 328 | 0 | 53 | 381 |
|
||||
| Markdown | 5 | 277 | 0 | 103 | 380 |
|
||||
| C++ | 9 | 163 | 0 | 26 | 189 |
|
||||
| YAML | 1 | 48 | 0 | 10 | 58 |
|
||||
| CMake | 1 | 8 | 0 | 2 | 10 |
|
||||
| Go Assembly | 1 | 8 | 0 | 2 | 10 |
|
||||
+-------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Directories
|
||||
+-------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| path | files | code | comment | blank | total |
|
||||
+-------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| . | 80 | 8,302 | 1 | 2,069 | 10,372 |
|
||||
| . (Files) | 3 | 192 | 0 | 70 | 262 |
|
||||
| .github | 1 | 48 | 0 | 10 | 58 |
|
||||
| .github\workflows | 1 | 48 | 0 | 10 | 58 |
|
||||
| cleonos | 53 | 6,481 | 1 | 1,636 | 8,118 |
|
||||
| cleonos\c | 53 | 6,481 | 1 | 1,636 | 8,118 |
|
||||
| cleonos\c\apps | 50 | 6,387 | 1 | 1,615 | 8,003 |
|
||||
| cleonos\c\apps (Files) | 45 | 4,570 | 1 | 1,158 | 5,729 |
|
||||
| cleonos\c\apps\shell | 5 | 1,817 | 0 | 457 | 2,274 |
|
||||
| cleonos\c\include | 1 | 26 | 0 | 0 | 26 |
|
||||
| cleonos\c\src | 2 | 68 | 0 | 21 | 89 |
|
||||
| clks | 16 | 1,160 | 0 | 265 | 1,425 |
|
||||
| clks\arch | 1 | 8 | 0 | 2 | 10 |
|
||||
| clks\arch\x86_64 | 1 | 8 | 0 | 2 | 10 |
|
||||
| clks\drivers | 2 | 122 | 0 | 31 | 153 |
|
||||
| clks\drivers\audio | 1 | 101 | 0 | 25 | 126 |
|
||||
| clks\drivers\video | 1 | 21 | 0 | 6 | 27 |
|
||||
| clks\include | 6 | 49 | 0 | 6 | 55 |
|
||||
| clks\include\clks | 6 | 49 | 0 | 6 | 55 |
|
||||
| clks\kernel | 7 | 981 | 0 | 226 | 1,207 |
|
||||
| docs | 2 | 81 | 0 | 30 | 111 |
|
||||
| wine | 5 | 340 | 0 | 58 | 398 |
|
||||
| wine (Files) | 1 | 12 | 0 | 5 | 17 |
|
||||
| wine\cleonos_wine_lib | 4 | 328 | 0 | 53 | 381 |
|
||||
+-------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Files
|
||||
+-------------------------------------------------------------+-------------+------------+------------+------------+------------+
|
||||
| filename | language | code | comment | blank | total |
|
||||
+-------------------------------------------------------------+-------------+------------+------------+------------+------------+
|
||||
| d:\Projects\C\cleonos\.github\workflows\build-os.yml | YAML | 48 | 0 | 10 | 58 |
|
||||
| d:\Projects\C\cleonos\CMakeLists.txt | CMake | 8 | 0 | 2 | 10 |
|
||||
| d:\Projects\C\cleonos\README.md | Markdown | 92 | 0 | 34 | 126 |
|
||||
| d:\Projects\C\cleonos\README.zh-CN.md | Markdown | 92 | 0 | 34 | 126 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ansi_main.c | C | 39 | 0 | 8 | 47 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ansitest_main.c | C | 142 | 0 | 35 | 177 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\append_main.c | C | 70 | 0 | 15 | 85 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\args_main.c | C | 49 | 0 | 13 | 62 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cat_main.c | C | 79 | 0 | 21 | 100 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cd_main.c | C | 50 | 0 | 12 | 62 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\clear_main.c | C | 35 | 0 | 8 | 43 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.c | C | 446 | 0 | 143 | 589 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.h | C++ | 80 | 0 | 19 | 99 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cp_main.c | C | 91 | 0 | 23 | 114 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cut_main.c | C | 214 | 1 | 55 | 270 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\dmesg_main.c | C | 60 | 0 | 15 | 75 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\exec_main.c | C | 83 | 0 | 19 | 102 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\exit_main.c | C | 50 | 0 | 11 | 61 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fastfetch_main.c | C | 180 | 0 | 34 | 214 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fsstat_main.c | C | 41 | 0 | 8 | 49 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\grep_main.c | C | 195 | 0 | 54 | 249 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\head_main.c | C | 164 | 0 | 47 | 211 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\help_main.c | C | 71 | 0 | 7 | 78 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\kbdstat_main.c | C | 40 | 0 | 8 | 48 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ls_main.c | C | 258 | 0 | 73 | 331 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memstat_main.c | C | 39 | 0 | 8 | 47 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\mkdir_main.c | C | 53 | 0 | 13 | 66 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\mv_main.c | C | 98 | 0 | 25 | 123 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\pid_main.c | C | 35 | 0 | 8 | 43 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\pwd_main.c | C | 35 | 0 | 8 | 43 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\restart_main.c | C | 36 | 0 | 8 | 44 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\rm_main.c | C | 53 | 0 | 13 | 66 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c | C | 1,535 | 0 | 392 | 1,927 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_external.c | C | -57 | 0 | -20 | -77 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c | C | 259 | 0 | 64 | 323 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_internal.h | C++ | 8 | 0 | 1 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_util.c | C | 72 | 0 | 20 | 92 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shstat_main.c | C | 41 | 0 | 8 | 49 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shutdown_main.c | C | 36 | 0 | 8 | 44 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\sleep_main.c | C | 48 | 0 | 11 | 59 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\sort_main.c | C | 205 | 0 | 63 | 268 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\spawn_main.c | C | 72 | 0 | 17 | 89 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\stats_main.c | C | 98 | 0 | 14 | 112 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\tail_main.c | C | 190 | 0 | 54 | 244 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\taskstat_main.c | C | 39 | 0 | 8 | 47 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\touch_main.c | C | 54 | 0 | 13 | 67 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\tty_main.c | C | 60 | 0 | 14 | 74 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\uniq_main.c | C | 168 | 0 | 48 | 216 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\userstat_main.c | C | 44 | 0 | 8 | 52 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wait_main.c | C | 64 | 0 | 14 | 78 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wavplay_main.c | C | 396 | 0 | 99 | 495 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wc_main.c | C | 164 | 0 | 45 | 209 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\write_main.c | C | 70 | 0 | 15 | 85 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\yield_main.c | C | 35 | 0 | 8 | 43 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h | C++ | 26 | 0 | 0 | 26 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\runtime.c | C | 29 | 0 | 7 | 36 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\syscall.c | C | 39 | 0 | 14 | 53 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\exec_stack_call.S | Go Assembly | 8 | 0 | 2 | 10 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\audio\pcspeaker.c | C | 101 | 0 | 25 | 126 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\framebuffer.c | C | 21 | 0 | 6 | 27 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\audio.h | C++ | 9 | 0 | 3 | 12 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\driver.h | C++ | 1 | 0 | 0 | 1 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\exec.h | C++ | 16 | 0 | 0 | 16 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\framebuffer.h | C++ | 3 | 0 | 1 | 4 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\keyboard.h | C++ | 7 | 0 | 1 | 8 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\syscall.h | C++ | 13 | 0 | 1 | 14 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\driver.c | C | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\exec.c | C | 299 | 0 | 71 | 370 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\interrupts.c | C | 9 | 0 | 1 | 10 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\keyboard.c | C | 52 | 0 | 15 | 67 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\kmain.c | C | 2 | 0 | 0 | 2 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\syscall.c | C | 127 | 0 | 30 | 157 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\tty.c | C | 486 | 0 | 108 | 594 |
|
||||
| d:\Projects\C\cleonos\docs\stage27.md | Markdown | 4 | 0 | 0 | 4 |
|
||||
| d:\Projects\C\cleonos\docs\syscall.md | Markdown | 77 | 0 | 30 | 107 |
|
||||
| d:\Projects\C\cleonos\wine\README.md | Markdown | 12 | 0 | 5 | 17 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\constants.py | Python | 13 | 0 | 1 | 14 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\platform.py | Python | 18 | 0 | 1 | 19 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\runner.py | Python | 237 | 0 | 38 | 275 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\state.py | Python | 60 | 0 | 13 | 73 |
|
||||
| Total | | 8,302 | 1 | 2,069 | 10,372 |
|
||||
+-------------------------------------------------------------+-------------+------------+------------+------------+------------+
|
||||
185
.VSCodeCounter/2026-04-17_16-44-24/results.csv
Normal file
185
.VSCodeCounter/2026-04-17_16-44-24/results.csv
Normal file
@@ -0,0 +1,185 @@
|
||||
"filename", "language", "pip requirements", "Python", "YAML", "Markdown", "Batch", "PowerShell", "Properties", "Makefile", "CMake", "Rust", "C", "C++", "Go Assembly", "comment", "blank", "total"
|
||||
"d:\Projects\C\cleonos\.github\workflows\build-os.yml", "YAML", 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 58
|
||||
"d:\Projects\C\cleonos\CMakeLists.txt", "CMake", 0, 0, 0, 0, 0, 0, 0, 0, 587, 0, 0, 0, 0, 0, 86, 673
|
||||
"d:\Projects\C\cleonos\Makefile", "Makefile", 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 22, 122
|
||||
"d:\Projects\C\cleonos\README.md", "Markdown", 0, 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 126
|
||||
"d:\Projects\C\cleonos\README.zh-CN.md", "Markdown", 0, 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 126
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ansi_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 11, 54
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ansitest_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 0, 0, 0, 35, 177
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\append_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 18, 92
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\args_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 13, 62
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, 24, 107
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cd_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 15, 69
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\clear_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 446, 0, 0, 0, 143, 589
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 19, 99
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cp_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, 0, 0, 26, 121
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cut_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 214, 0, 0, 1, 55, 270
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\dmesg_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 18, 82
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_kmain.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\exec_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 22, 109
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\exit_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 14, 68
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fastfetch_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 0, 0, 0, 34, 214
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fsstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 11, 56
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\grep_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, 0, 0, 0, 54, 249
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\head_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, 0, 0, 47, 211
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\hello_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 2, 8
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\help_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 0, 0, 0, 10, 85
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\kbdstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 11, 55
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ls_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 262, 0, 0, 0, 76, 338
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memc_kmain.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memc_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 3, 11
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 11, 54
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\mkdir_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 16, 73
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\mv_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 28, 130
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\pid_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\pwd_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\restart_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 11, 51
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\rm_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 16, 73
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2311, 0, 0, 0, 574, 2885
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_external.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 0, 0, 0, 55, 221
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 514, 0, 0, 0, 132, 646
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_internal.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 0, 0, 20, 112
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_path.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 153, 0, 0, 0, 50, 203
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_script.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 12, 47
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_util.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 283, 0, 0, 0, 86, 369
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 6, 25
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 11, 56
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shutdown_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 11, 51
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\sleep_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 14, 66
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\sort_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 205, 0, 0, 0, 63, 268
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\spawn_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 20, 96
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\stats_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 17, 119
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\tail_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 190, 0, 0, 0, 54, 244
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\taskstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 11, 54
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\touch_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 16, 74
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\tty_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 17, 81
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ttydrv_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\uniq_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 0, 0, 0, 48, 216
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\userstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 11, 59
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wait_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 17, 85
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wavplay_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 396, 0, 0, 0, 99, 495
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wc_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, 0, 0, 45, 209
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\write_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 18, 92
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\yield_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_rust_bridge.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 4, 10
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 6, 134
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\runtime.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 12, 49
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\syscall.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 0, 0, 0, 64, 255
|
||||
"d:\Projects\C\cleonos\cleonos\c\stub.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 4, 2, 9
|
||||
"d:\Projects\C\cleonos\cleonos\rust\src\lib.rs", "Rust", 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 9, 32
|
||||
"d:\Projects\C\cleonos\clks\arch\aarch64\boot.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\boot.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\exec_stack_call.S", "Go Assembly", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 8, 30
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\interrupt_stubs.S", "Go Assembly", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 0, 12, 120
|
||||
"d:\Projects\C\cleonos\clks\drivers\audio\pcspeaker.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 25, 126
|
||||
"d:\Projects\C\cleonos\clks\drivers\serial\serial.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 16, 68
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\font8x8.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 8, 75
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\font8x8.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 3, 8
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\framebuffer.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 251, 0, 0, 0, 70, 321
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\psf_font.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, 0, 0, 56, 286
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\psf_font.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 5, 20
|
||||
"d:\Projects\C\cleonos\clks\include\clks\audio.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 3, 12
|
||||
"d:\Projects\C\cleonos\clks\include\clks\boot.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 4, 15
|
||||
"d:\Projects\C\cleonos\clks\include\clks\compiler.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 4, 17
|
||||
"d:\Projects\C\cleonos\clks\include\clks\cpu.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 4, 24
|
||||
"d:\Projects\C\cleonos\clks\include\clks\desktop.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 4, 11
|
||||
"d:\Projects\C\cleonos\clks\include\clks\driver.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 8, 37
|
||||
"d:\Projects\C\cleonos\clks\include\clks\elf64.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 9, 41
|
||||
"d:\Projects\C\cleonos\clks\include\clks\elfrunner.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\clks\include\clks\exec.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 4, 38
|
||||
"d:\Projects\C\cleonos\clks\include\clks\framebuffer.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 6, 32
|
||||
"d:\Projects\C\cleonos\clks\include\clks\fs.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 7, 30
|
||||
"d:\Projects\C\cleonos\clks\include\clks\heap.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 4, 19
|
||||
"d:\Projects\C\cleonos\clks\include\clks\interrupts.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\clks\include\clks\kelf.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 5, 14
|
||||
"d:\Projects\C\cleonos\clks\include\clks\kernel.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 2, 6
|
||||
"d:\Projects\C\cleonos\clks\include\clks\keyboard.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 6, 33
|
||||
"d:\Projects\C\cleonos\clks\include\clks\limine.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 0, 0, 24, 156
|
||||
"d:\Projects\C\cleonos\clks\include\clks\log.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 5, 19
|
||||
"d:\Projects\C\cleonos\clks\include\clks\mouse.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 6, 26
|
||||
"d:\Projects\C\cleonos\clks\include\clks\panic.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 3, 10
|
||||
"d:\Projects\C\cleonos\clks\include\clks\pmm.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 5, 21
|
||||
"d:\Projects\C\cleonos\clks\include\clks\ramdisk.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 8, 25
|
||||
"d:\Projects\C\cleonos\clks\include\clks\scheduler.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 5, 23
|
||||
"d:\Projects\C\cleonos\clks\include\clks\serial.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 2, 8
|
||||
"d:\Projects\C\cleonos\clks\include\clks\service.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 8, 39
|
||||
"d:\Projects\C\cleonos\clks\include\clks\shell.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 3, 10
|
||||
"d:\Projects\C\cleonos\clks\include\clks\string.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 3, 12
|
||||
"d:\Projects\C\cleonos\clks\include\clks\syscall.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 5, 73
|
||||
"d:\Projects\C\cleonos\clks\include\clks\task.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 7, 31
|
||||
"d:\Projects\C\cleonos\clks\include\clks\tty.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 4, 18
|
||||
"d:\Projects\C\cleonos\clks\include\clks\types.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 6, 23
|
||||
"d:\Projects\C\cleonos\clks\include\clks\userland.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 4, 16
|
||||
"d:\Projects\C\cleonos\clks\kernel\desktop.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 321, 0, 0, 0, 86, 407
|
||||
"d:\Projects\C\cleonos\clks\kernel\driver.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 169, 0, 0, 0, 49, 218
|
||||
"d:\Projects\C\cleonos\clks\kernel\elf64.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 239, 0, 0, 0, 73, 312
|
||||
"d:\Projects\C\cleonos\clks\kernel\elfrunner.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 8, 38
|
||||
"d:\Projects\C\cleonos\clks\kernel\exec.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 854, 0, 0, 0, 237, 1091
|
||||
"d:\Projects\C\cleonos\clks\kernel\fs.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 698, 0, 0, 0, 220, 918
|
||||
"d:\Projects\C\cleonos\clks\kernel\heap.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 134, 0, 0, 0, 42, 176
|
||||
"d:\Projects\C\cleonos\clks\kernel\interrupts.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 311, 0, 0, 0, 44, 355
|
||||
"d:\Projects\C\cleonos\clks\kernel\kelf.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 203, 0, 0, 1, 53, 257
|
||||
"d:\Projects\C\cleonos\clks\kernel\keyboard.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 311, 0, 0, 0, 79, 390
|
||||
"d:\Projects\C\cleonos\clks\kernel\kmain.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 1, 52, 253
|
||||
"d:\Projects\C\cleonos\clks\kernel\limine_requests.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 26, 102
|
||||
"d:\Projects\C\cleonos\clks\kernel\log.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 0, 0, 33, 156
|
||||
"d:\Projects\C\cleonos\clks\kernel\mouse.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 0, 0, 0, 63, 309
|
||||
"d:\Projects\C\cleonos\clks\kernel\panic.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 0, 0, 0, 60, 239
|
||||
"d:\Projects\C\cleonos\clks\kernel\pmm.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 0, 0, 0, 23, 105
|
||||
"d:\Projects\C\cleonos\clks\kernel\ramdisk.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 0, 50, 222
|
||||
"d:\Projects\C\cleonos\clks\kernel\scheduler.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 44, 180
|
||||
"d:\Projects\C\cleonos\clks\kernel\service.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 34, 147
|
||||
"d:\Projects\C\cleonos\clks\kernel\shell.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1249, 0, 0, 0, 317, 1566
|
||||
"d:\Projects\C\cleonos\clks\kernel\syscall.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 619, 0, 0, 0, 140, 759
|
||||
"d:\Projects\C\cleonos\clks\kernel\tty.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1115, 0, 0, 0, 275, 1390
|
||||
"d:\Projects\C\cleonos\clks\kernel\userland.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 0, 0, 0, 35, 159
|
||||
"d:\Projects\C\cleonos\clks\lib\libc_compat.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 7, 32
|
||||
"d:\Projects\C\cleonos\clks\lib\string.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 16, 70
|
||||
"d:\Projects\C\cleonos\clks\rust\src\lib.rs", "Rust", 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 6, 27
|
||||
"d:\Projects\C\cleonos\cmake\check_tools.cmake", "CMake", 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 6, 38
|
||||
"d:\Projects\C\cleonos\cmake\log.cmake", "CMake", 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 6, 36
|
||||
"d:\Projects\C\cleonos\cmake\log_emit.cmake", "CMake", 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 6, 29
|
||||
"d:\Projects\C\cleonos\cmake\setup_limine.cmake", "CMake", 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 18, 118
|
||||
"d:\Projects\C\cleonos\configs\limine.conf", "Properties", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\docs\README.md", "Markdown", 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 35
|
||||
"d:\Projects\C\cleonos\docs\stage1.md", "Markdown", 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 46
|
||||
"d:\Projects\C\cleonos\docs\stage10.md", "Markdown", 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage11.md", "Markdown", 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 41
|
||||
"d:\Projects\C\cleonos\docs\stage12.md", "Markdown", 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 46
|
||||
"d:\Projects\C\cleonos\docs\stage13.md", "Markdown", 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage14.md", "Markdown", 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 52
|
||||
"d:\Projects\C\cleonos\docs\stage15.md", "Markdown", 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 54
|
||||
"d:\Projects\C\cleonos\docs\stage2.md", "Markdown", 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 35
|
||||
"d:\Projects\C\cleonos\docs\stage20.md", "Markdown", 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 52
|
||||
"d:\Projects\C\cleonos\docs\stage21.md", "Markdown", 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 79
|
||||
"d:\Projects\C\cleonos\docs\stage22.md", "Markdown", 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 75
|
||||
"d:\Projects\C\cleonos\docs\stage23.md", "Markdown", 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 47
|
||||
"d:\Projects\C\cleonos\docs\stage24.md", "Markdown", 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 49
|
||||
"d:\Projects\C\cleonos\docs\stage25.md", "Markdown", 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 65
|
||||
"d:\Projects\C\cleonos\docs\stage26.md", "Markdown", 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 39
|
||||
"d:\Projects\C\cleonos\docs\stage27.md", "Markdown", 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 39
|
||||
"d:\Projects\C\cleonos\docs\stage28.md", "Markdown", 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 44
|
||||
"d:\Projects\C\cleonos\docs\stage29.md", "Markdown", 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 40
|
||||
"d:\Projects\C\cleonos\docs\stage3.md", "Markdown", 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 34
|
||||
"d:\Projects\C\cleonos\docs\stage4.md", "Markdown", 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 35
|
||||
"d:\Projects\C\cleonos\docs\stage5.md", "Markdown", 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 34
|
||||
"d:\Projects\C\cleonos\docs\stage6.md", "Markdown", 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 36
|
||||
"d:\Projects\C\cleonos\docs\stage7.md", "Markdown", 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage8.md", "Markdown", 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 37
|
||||
"d:\Projects\C\cleonos\docs\stage9.md", "Markdown", 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 37
|
||||
"d:\Projects\C\cleonos\docs\syscall.md", "Markdown", 0, 0, 0, 328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 482
|
||||
"d:\Projects\C\cleonos\ramdisk\shell\init.cmd", "Batch", 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6
|
||||
"d:\Projects\C\cleonos\scripts\gen-tty-psf.ps1", "PowerShell", 0, 0, 0, 0, 0, 171, 0, 0, 0, 0, 0, 0, 0, 2, 42, 215
|
||||
"d:\Projects\C\cleonos\wine\README.md", "Markdown", 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 68
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine.py", "Python", 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 7
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\__init__.py", "Python", 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\cli.py", "Python", 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 54
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\constants.py", "Python", 0, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 11, 88
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\input_pump.py", "Python", 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 99
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\platform.py", "Python", 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 60
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\runner.py", "Python", 0, 990, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 1165
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\state.py", "Python", 0, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 204
|
||||
"d:\Projects\C\cleonos\wine\requirements.txt", "pip requirements", 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2
|
||||
"Total", "-", 1, 1418, 48, 1573, 4, 171, 6, 100, 772, 44, 16864, 1009, 130, 11, 5616, 27767
|
||||
|
1
.VSCodeCounter/2026-04-17_16-44-24/results.json
Normal file
1
.VSCodeCounter/2026-04-17_16-44-24/results.json
Normal file
File diff suppressed because one or more lines are too long
69
.VSCodeCounter/2026-04-17_16-44-24/results.md
Normal file
69
.VSCodeCounter/2026-04-17_16-44-24/results.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# Summary
|
||||
|
||||
Date : 2026-04-17 16:44:24
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 183 files, 22140 codes, 11 comments, 5616 blanks, all 27767 lines
|
||||
|
||||
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
|
||||
## Languages
|
||||
| language | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| C | 92 | 16,864 | 7 | 4,488 | 21,359 |
|
||||
| Markdown | 30 | 1,573 | 0 | 400 | 1,973 |
|
||||
| Python | 8 | 1,418 | 2 | 262 | 1,682 |
|
||||
| C++ | 38 | 1,009 | 0 | 231 | 1,240 |
|
||||
| CMake | 5 | 772 | 0 | 122 | 894 |
|
||||
| PowerShell | 1 | 171 | 2 | 42 | 215 |
|
||||
| Go Assembly | 2 | 130 | 0 | 20 | 150 |
|
||||
| Makefile | 1 | 100 | 0 | 22 | 122 |
|
||||
| YAML | 1 | 48 | 0 | 10 | 58 |
|
||||
| Rust | 2 | 44 | 0 | 15 | 59 |
|
||||
| Properties | 1 | 6 | 0 | 1 | 7 |
|
||||
| Batch | 1 | 4 | 0 | 2 | 6 |
|
||||
| pip requirements | 1 | 1 | 0 | 1 | 2 |
|
||||
|
||||
## Directories
|
||||
| path | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| . | 183 | 22,140 | 11 | 5,616 | 27,767 |
|
||||
| . (Files) | 4 | 871 | 0 | 176 | 1,047 |
|
||||
| .github | 1 | 48 | 0 | 10 | 58 |
|
||||
| .github\\workflows | 1 | 48 | 0 | 10 | 58 |
|
||||
| cleonos | 65 | 8,697 | 5 | 2,303 | 11,005 |
|
||||
| cleonos\\c | 64 | 8,674 | 5 | 2,294 | 10,973 |
|
||||
| cleonos\\c (Files) | 1 | 3 | 4 | 2 | 9 |
|
||||
| cleonos\\c\\apps | 59 | 8,309 | 1 | 2,206 | 10,516 |
|
||||
| cleonos\\c\\apps (Files) | 52 | 4,755 | 1 | 1,277 | 6,033 |
|
||||
| cleonos\\c\\apps\\shell | 7 | 3,554 | 0 | 929 | 4,483 |
|
||||
| cleonos\\c\\include | 2 | 134 | 0 | 10 | 144 |
|
||||
| cleonos\\c\\src | 2 | 228 | 0 | 76 | 304 |
|
||||
| cleonos\\rust | 1 | 23 | 0 | 9 | 32 |
|
||||
| cleonos\\rust\\src | 1 | 23 | 0 | 9 | 32 |
|
||||
| clks | 69 | 9,350 | 2 | 2,451 | 11,803 |
|
||||
| clks\\arch | 4 | 142 | 0 | 22 | 164 |
|
||||
| clks\\arch\\aarch64 | 1 | 6 | 0 | 1 | 7 |
|
||||
| clks\\arch\\x86_64 | 3 | 136 | 0 | 21 | 157 |
|
||||
| clks\\drivers | 7 | 721 | 0 | 183 | 904 |
|
||||
| clks\\drivers\\audio | 1 | 101 | 0 | 25 | 126 |
|
||||
| clks\\drivers\\serial | 1 | 52 | 0 | 16 | 68 |
|
||||
| clks\\drivers\\video | 5 | 568 | 0 | 142 | 710 |
|
||||
| clks\\include | 32 | 683 | 0 | 174 | 857 |
|
||||
| clks\\include\\clks | 32 | 683 | 0 | 174 | 857 |
|
||||
| clks\\kernel | 23 | 7,704 | 2 | 2,043 | 9,749 |
|
||||
| clks\\lib | 2 | 79 | 0 | 23 | 102 |
|
||||
| clks\\rust | 1 | 21 | 0 | 6 | 27 |
|
||||
| clks\\rust\\src | 1 | 21 | 0 | 6 | 27 |
|
||||
| cmake | 4 | 185 | 0 | 36 | 221 |
|
||||
| configs | 1 | 6 | 0 | 1 | 7 |
|
||||
| docs | 27 | 1,340 | 0 | 313 | 1,653 |
|
||||
| ramdisk | 1 | 4 | 0 | 2 | 6 |
|
||||
| ramdisk\\shell | 1 | 4 | 0 | 2 | 6 |
|
||||
| scripts | 1 | 171 | 2 | 42 | 215 |
|
||||
| wine | 10 | 1,468 | 2 | 282 | 1,752 |
|
||||
| wine (Files) | 3 | 53 | 1 | 23 | 77 |
|
||||
| wine\\cleonos_wine_lib | 7 | 1,415 | 1 | 259 | 1,675 |
|
||||
|
||||
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
255
.VSCodeCounter/2026-04-17_16-44-24/results.txt
Normal file
255
.VSCodeCounter/2026-04-17_16-44-24/results.txt
Normal file
@@ -0,0 +1,255 @@
|
||||
Date : 2026-04-17 16:44:24
|
||||
Directory : d:\Projects\C\cleonos
|
||||
Total : 183 files, 22140 codes, 11 comments, 5616 blanks, all 27767 lines
|
||||
|
||||
Languages
|
||||
+------------------+------------+------------+------------+------------+------------+
|
||||
| language | files | code | comment | blank | total |
|
||||
+------------------+------------+------------+------------+------------+------------+
|
||||
| C | 92 | 16,864 | 7 | 4,488 | 21,359 |
|
||||
| Markdown | 30 | 1,573 | 0 | 400 | 1,973 |
|
||||
| Python | 8 | 1,418 | 2 | 262 | 1,682 |
|
||||
| C++ | 38 | 1,009 | 0 | 231 | 1,240 |
|
||||
| CMake | 5 | 772 | 0 | 122 | 894 |
|
||||
| PowerShell | 1 | 171 | 2 | 42 | 215 |
|
||||
| Go Assembly | 2 | 130 | 0 | 20 | 150 |
|
||||
| Makefile | 1 | 100 | 0 | 22 | 122 |
|
||||
| YAML | 1 | 48 | 0 | 10 | 58 |
|
||||
| Rust | 2 | 44 | 0 | 15 | 59 |
|
||||
| Properties | 1 | 6 | 0 | 1 | 7 |
|
||||
| Batch | 1 | 4 | 0 | 2 | 6 |
|
||||
| pip requirements | 1 | 1 | 0 | 1 | 2 |
|
||||
+------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Directories
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| path | files | code | comment | blank | total |
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| . | 183 | 22,140 | 11 | 5,616 | 27,767 |
|
||||
| . (Files) | 4 | 871 | 0 | 176 | 1,047 |
|
||||
| .github | 1 | 48 | 0 | 10 | 58 |
|
||||
| .github\workflows | 1 | 48 | 0 | 10 | 58 |
|
||||
| cleonos | 65 | 8,697 | 5 | 2,303 | 11,005 |
|
||||
| cleonos\c | 64 | 8,674 | 5 | 2,294 | 10,973 |
|
||||
| cleonos\c (Files) | 1 | 3 | 4 | 2 | 9 |
|
||||
| cleonos\c\apps | 59 | 8,309 | 1 | 2,206 | 10,516 |
|
||||
| cleonos\c\apps (Files) | 52 | 4,755 | 1 | 1,277 | 6,033 |
|
||||
| cleonos\c\apps\shell | 7 | 3,554 | 0 | 929 | 4,483 |
|
||||
| cleonos\c\include | 2 | 134 | 0 | 10 | 144 |
|
||||
| cleonos\c\src | 2 | 228 | 0 | 76 | 304 |
|
||||
| cleonos\rust | 1 | 23 | 0 | 9 | 32 |
|
||||
| cleonos\rust\src | 1 | 23 | 0 | 9 | 32 |
|
||||
| clks | 69 | 9,350 | 2 | 2,451 | 11,803 |
|
||||
| clks\arch | 4 | 142 | 0 | 22 | 164 |
|
||||
| clks\arch\aarch64 | 1 | 6 | 0 | 1 | 7 |
|
||||
| clks\arch\x86_64 | 3 | 136 | 0 | 21 | 157 |
|
||||
| clks\drivers | 7 | 721 | 0 | 183 | 904 |
|
||||
| clks\drivers\audio | 1 | 101 | 0 | 25 | 126 |
|
||||
| clks\drivers\serial | 1 | 52 | 0 | 16 | 68 |
|
||||
| clks\drivers\video | 5 | 568 | 0 | 142 | 710 |
|
||||
| clks\include | 32 | 683 | 0 | 174 | 857 |
|
||||
| clks\include\clks | 32 | 683 | 0 | 174 | 857 |
|
||||
| clks\kernel | 23 | 7,704 | 2 | 2,043 | 9,749 |
|
||||
| clks\lib | 2 | 79 | 0 | 23 | 102 |
|
||||
| clks\rust | 1 | 21 | 0 | 6 | 27 |
|
||||
| clks\rust\src | 1 | 21 | 0 | 6 | 27 |
|
||||
| cmake | 4 | 185 | 0 | 36 | 221 |
|
||||
| configs | 1 | 6 | 0 | 1 | 7 |
|
||||
| docs | 27 | 1,340 | 0 | 313 | 1,653 |
|
||||
| ramdisk | 1 | 4 | 0 | 2 | 6 |
|
||||
| ramdisk\shell | 1 | 4 | 0 | 2 | 6 |
|
||||
| scripts | 1 | 171 | 2 | 42 | 215 |
|
||||
| wine | 10 | 1,468 | 2 | 282 | 1,752 |
|
||||
| wine (Files) | 3 | 53 | 1 | 23 | 77 |
|
||||
| wine\cleonos_wine_lib | 7 | 1,415 | 1 | 259 | 1,675 |
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Files
|
||||
+---------------------------------------------------------------+------------------+------------+------------+------------+------------+
|
||||
| filename | language | code | comment | blank | total |
|
||||
+---------------------------------------------------------------+------------------+------------+------------+------------+------------+
|
||||
| d:\Projects\C\cleonos\.github\workflows\build-os.yml | YAML | 48 | 0 | 10 | 58 |
|
||||
| d:\Projects\C\cleonos\CMakeLists.txt | CMake | 587 | 0 | 86 | 673 |
|
||||
| d:\Projects\C\cleonos\Makefile | Makefile | 100 | 0 | 22 | 122 |
|
||||
| d:\Projects\C\cleonos\README.md | Markdown | 92 | 0 | 34 | 126 |
|
||||
| d:\Projects\C\cleonos\README.zh-CN.md | Markdown | 92 | 0 | 34 | 126 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ansi_main.c | C | 43 | 0 | 11 | 54 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ansitest_main.c | C | 142 | 0 | 35 | 177 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\append_main.c | C | 74 | 0 | 18 | 92 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\args_main.c | C | 49 | 0 | 13 | 62 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cat_main.c | C | 83 | 0 | 24 | 107 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cd_main.c | C | 54 | 0 | 15 | 69 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\clear_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.c | C | 446 | 0 | 143 | 589 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.h | C++ | 80 | 0 | 19 | 99 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cp_main.c | C | 95 | 0 | 26 | 121 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cut_main.c | C | 214 | 1 | 55 | 270 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\dmesg_main.c | C | 64 | 0 | 18 | 82 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_kmain.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_main.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\exec_main.c | C | 87 | 0 | 22 | 109 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\exit_main.c | C | 54 | 0 | 14 | 68 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fastfetch_main.c | C | 180 | 0 | 34 | 214 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fsstat_main.c | C | 45 | 0 | 11 | 56 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\grep_main.c | C | 195 | 0 | 54 | 249 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\head_main.c | C | 164 | 0 | 47 | 211 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\hello_main.c | C | 6 | 0 | 2 | 8 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\help_main.c | C | 75 | 0 | 10 | 85 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\kbdstat_main.c | C | 44 | 0 | 11 | 55 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ls_main.c | C | 262 | 0 | 76 | 338 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memc_kmain.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memc_main.c | C | 8 | 0 | 3 | 11 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memstat_main.c | C | 43 | 0 | 11 | 54 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\mkdir_main.c | C | 57 | 0 | 16 | 73 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\mv_main.c | C | 102 | 0 | 28 | 130 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\pid_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\pwd_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\restart_main.c | C | 40 | 0 | 11 | 51 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\rm_main.c | C | 57 | 0 | 16 | 73 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c | C | 2,311 | 0 | 574 | 2,885 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_external.c | C | 166 | 0 | 55 | 221 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c | C | 514 | 0 | 132 | 646 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_internal.h | C++ | 92 | 0 | 20 | 112 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_path.c | C | 153 | 0 | 50 | 203 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_script.c | C | 35 | 0 | 12 | 47 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_util.c | C | 283 | 0 | 86 | 369 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell_main.c | C | 19 | 0 | 6 | 25 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shstat_main.c | C | 45 | 0 | 11 | 56 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shutdown_main.c | C | 40 | 0 | 11 | 51 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\sleep_main.c | C | 52 | 0 | 14 | 66 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\sort_main.c | C | 205 | 0 | 63 | 268 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\spawn_main.c | C | 76 | 0 | 20 | 96 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\stats_main.c | C | 102 | 0 | 17 | 119 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\tail_main.c | C | 190 | 0 | 54 | 244 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\taskstat_main.c | C | 43 | 0 | 11 | 54 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\touch_main.c | C | 58 | 0 | 16 | 74 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\tty_main.c | C | 64 | 0 | 17 | 81 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ttydrv_main.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\uniq_main.c | C | 168 | 0 | 48 | 216 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\userstat_main.c | C | 48 | 0 | 11 | 59 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wait_main.c | C | 68 | 0 | 17 | 85 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wavplay_main.c | C | 396 | 0 | 99 | 495 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wc_main.c | C | 164 | 0 | 45 | 209 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\write_main.c | C | 74 | 0 | 18 | 92 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\yield_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_rust_bridge.h | C++ | 6 | 0 | 4 | 10 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h | C++ | 128 | 0 | 6 | 134 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\runtime.c | C | 37 | 0 | 12 | 49 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\syscall.c | C | 191 | 0 | 64 | 255 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\stub.c | C | 3 | 4 | 2 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\rust\src\lib.rs | Rust | 23 | 0 | 9 | 32 |
|
||||
| d:\Projects\C\cleonos\clks\arch\aarch64\boot.c | C | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\boot.c | C | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\exec_stack_call.S | Go Assembly | 22 | 0 | 8 | 30 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\interrupt_stubs.S | Go Assembly | 108 | 0 | 12 | 120 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\audio\pcspeaker.c | C | 101 | 0 | 25 | 126 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\serial\serial.c | C | 52 | 0 | 16 | 68 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\font8x8.c | C | 67 | 0 | 8 | 75 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\font8x8.h | C++ | 5 | 0 | 3 | 8 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\framebuffer.c | C | 251 | 0 | 70 | 321 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\psf_font.c | C | 230 | 0 | 56 | 286 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\psf_font.h | C++ | 15 | 0 | 5 | 20 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\audio.h | C++ | 9 | 0 | 3 | 12 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\boot.h | C++ | 11 | 0 | 4 | 15 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\compiler.h | C++ | 13 | 0 | 4 | 17 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\cpu.h | C++ | 20 | 0 | 4 | 24 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\desktop.h | C++ | 7 | 0 | 4 | 11 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\driver.h | C++ | 29 | 0 | 8 | 37 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\elf64.h | C++ | 32 | 0 | 9 | 41 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\elfrunner.h | C++ | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\exec.h | C++ | 34 | 0 | 4 | 38 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\framebuffer.h | C++ | 26 | 0 | 6 | 32 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\fs.h | C++ | 23 | 0 | 7 | 30 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\heap.h | C++ | 15 | 0 | 4 | 19 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\interrupts.h | C++ | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\kelf.h | C++ | 9 | 0 | 5 | 14 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\kernel.h | C++ | 4 | 0 | 2 | 6 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\keyboard.h | C++ | 27 | 0 | 6 | 33 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\limine.h | C++ | 132 | 0 | 24 | 156 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\log.h | C++ | 14 | 0 | 5 | 19 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\mouse.h | C++ | 20 | 0 | 6 | 26 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\panic.h | C++ | 7 | 0 | 3 | 10 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\pmm.h | C++ | 16 | 0 | 5 | 21 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\ramdisk.h | C++ | 17 | 0 | 8 | 25 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\scheduler.h | C++ | 18 | 0 | 5 | 23 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\serial.h | C++ | 6 | 0 | 2 | 8 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\service.h | C++ | 31 | 0 | 8 | 39 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\shell.h | C++ | 7 | 0 | 3 | 10 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\string.h | C++ | 9 | 0 | 3 | 12 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\syscall.h | C++ | 68 | 0 | 5 | 73 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\task.h | C++ | 24 | 0 | 7 | 31 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\tty.h | C++ | 14 | 0 | 4 | 18 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\types.h | C++ | 17 | 0 | 6 | 23 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\userland.h | C++ | 12 | 0 | 4 | 16 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\desktop.c | C | 321 | 0 | 86 | 407 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\driver.c | C | 169 | 0 | 49 | 218 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\elf64.c | C | 239 | 0 | 73 | 312 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\elfrunner.c | C | 30 | 0 | 8 | 38 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\exec.c | C | 854 | 0 | 237 | 1,091 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\fs.c | C | 698 | 0 | 220 | 918 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\heap.c | C | 134 | 0 | 42 | 176 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\interrupts.c | C | 311 | 0 | 44 | 355 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\kelf.c | C | 203 | 1 | 53 | 257 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\keyboard.c | C | 311 | 0 | 79 | 390 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\kmain.c | C | 200 | 1 | 52 | 253 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\limine_requests.c | C | 76 | 0 | 26 | 102 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\log.c | C | 123 | 0 | 33 | 156 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\mouse.c | C | 246 | 0 | 63 | 309 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\panic.c | C | 179 | 0 | 60 | 239 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\pmm.c | C | 82 | 0 | 23 | 105 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\ramdisk.c | C | 172 | 0 | 50 | 222 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\scheduler.c | C | 136 | 0 | 44 | 180 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\service.c | C | 113 | 0 | 34 | 147 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\shell.c | C | 1,249 | 0 | 317 | 1,566 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\syscall.c | C | 619 | 0 | 140 | 759 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\tty.c | C | 1,115 | 0 | 275 | 1,390 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\userland.c | C | 124 | 0 | 35 | 159 |
|
||||
| d:\Projects\C\cleonos\clks\lib\libc_compat.c | C | 25 | 0 | 7 | 32 |
|
||||
| d:\Projects\C\cleonos\clks\lib\string.c | C | 54 | 0 | 16 | 70 |
|
||||
| d:\Projects\C\cleonos\clks\rust\src\lib.rs | Rust | 21 | 0 | 6 | 27 |
|
||||
| d:\Projects\C\cleonos\cmake\check_tools.cmake | CMake | 32 | 0 | 6 | 38 |
|
||||
| d:\Projects\C\cleonos\cmake\log.cmake | CMake | 30 | 0 | 6 | 36 |
|
||||
| d:\Projects\C\cleonos\cmake\log_emit.cmake | CMake | 23 | 0 | 6 | 29 |
|
||||
| d:\Projects\C\cleonos\cmake\setup_limine.cmake | CMake | 100 | 0 | 18 | 118 |
|
||||
| d:\Projects\C\cleonos\configs\limine.conf | Properties | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\docs\README.md | Markdown | 31 | 0 | 4 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage1.md | Markdown | 41 | 0 | 5 | 46 |
|
||||
| d:\Projects\C\cleonos\docs\stage10.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage11.md | Markdown | 36 | 0 | 5 | 41 |
|
||||
| d:\Projects\C\cleonos\docs\stage12.md | Markdown | 40 | 0 | 6 | 46 |
|
||||
| d:\Projects\C\cleonos\docs\stage13.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage14.md | Markdown | 44 | 0 | 8 | 52 |
|
||||
| d:\Projects\C\cleonos\docs\stage15.md | Markdown | 47 | 0 | 7 | 54 |
|
||||
| d:\Projects\C\cleonos\docs\stage2.md | Markdown | 30 | 0 | 5 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage20.md | Markdown | 46 | 0 | 6 | 52 |
|
||||
| d:\Projects\C\cleonos\docs\stage21.md | Markdown | 72 | 0 | 7 | 79 |
|
||||
| d:\Projects\C\cleonos\docs\stage22.md | Markdown | 68 | 0 | 7 | 75 |
|
||||
| d:\Projects\C\cleonos\docs\stage23.md | Markdown | 41 | 0 | 6 | 47 |
|
||||
| d:\Projects\C\cleonos\docs\stage24.md | Markdown | 42 | 0 | 7 | 49 |
|
||||
| d:\Projects\C\cleonos\docs\stage25.md | Markdown | 58 | 0 | 7 | 65 |
|
||||
| d:\Projects\C\cleonos\docs\stage26.md | Markdown | 32 | 0 | 7 | 39 |
|
||||
| d:\Projects\C\cleonos\docs\stage27.md | Markdown | 32 | 0 | 7 | 39 |
|
||||
| d:\Projects\C\cleonos\docs\stage28.md | Markdown | 37 | 0 | 7 | 44 |
|
||||
| d:\Projects\C\cleonos\docs\stage29.md | Markdown | 33 | 0 | 7 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage3.md | Markdown | 29 | 0 | 5 | 34 |
|
||||
| d:\Projects\C\cleonos\docs\stage4.md | Markdown | 30 | 0 | 5 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage5.md | Markdown | 29 | 0 | 5 | 34 |
|
||||
| d:\Projects\C\cleonos\docs\stage6.md | Markdown | 30 | 0 | 6 | 36 |
|
||||
| d:\Projects\C\cleonos\docs\stage7.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage8.md | Markdown | 31 | 0 | 6 | 37 |
|
||||
| d:\Projects\C\cleonos\docs\stage9.md | Markdown | 31 | 0 | 6 | 37 |
|
||||
| d:\Projects\C\cleonos\docs\syscall.md | Markdown | 328 | 0 | 154 | 482 |
|
||||
| d:\Projects\C\cleonos\ramdisk\shell\init.cmd | Batch | 4 | 0 | 2 | 6 |
|
||||
| d:\Projects\C\cleonos\scripts\gen-tty-psf.ps1 | PowerShell | 171 | 2 | 42 | 215 |
|
||||
| d:\Projects\C\cleonos\wine\README.md | Markdown | 49 | 0 | 19 | 68 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine.py | Python | 3 | 1 | 3 | 7 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\__init__.py | Python | 4 | 0 | 1 | 5 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\cli.py | Python | 44 | 0 | 10 | 54 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\constants.py | Python | 76 | 1 | 11 | 88 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\input_pump.py | Python | 82 | 0 | 17 | 99 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\platform.py | Python | 55 | 0 | 5 | 60 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\runner.py | Python | 990 | 0 | 175 | 1,165 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\state.py | Python | 164 | 0 | 40 | 204 |
|
||||
| d:\Projects\C\cleonos\wine\requirements.txt | pip requirements | 1 | 0 | 1 | 2 |
|
||||
| Total | | 22,140 | 11 | 5,616 | 27,767 |
|
||||
+---------------------------------------------------------------+------------------+------------+------------+------------+------------+
|
||||
207
.VSCodeCounter/2026-04-17_19-36-06/details.md
Normal file
207
.VSCodeCounter/2026-04-17_19-36-06/details.md
Normal file
@@ -0,0 +1,207 @@
|
||||
# Details
|
||||
|
||||
Date : 2026-04-17 19:36:06
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 192 files, 25119 codes, 12 comments, 6368 blanks, all 31499 lines
|
||||
|
||||
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
|
||||
## Files
|
||||
| filename | language | code | comment | blank | total |
|
||||
| :--- | :--- | ---: | ---: | ---: | ---: |
|
||||
| [.github/workflows/build-os.yml](/.github/workflows/build-os.yml) | YAML | 48 | 0 | 10 | 58 |
|
||||
| [CMakeLists.txt](/CMakeLists.txt) | CMake | 614 | 0 | 88 | 702 |
|
||||
| [Makefile](/Makefile) | Makefile | 100 | 0 | 22 | 122 |
|
||||
| [README.md](/README.md) | Markdown | 92 | 0 | 34 | 126 |
|
||||
| [README.zh-CN.md](/README.zh-CN.md) | Markdown | 92 | 0 | 34 | 126 |
|
||||
| [cleonos/c/apps/ansi\_main.c](/cleonos/c/apps/ansi_main.c) | C | 43 | 0 | 11 | 54 |
|
||||
| [cleonos/c/apps/ansitest\_main.c](/cleonos/c/apps/ansitest_main.c) | C | 142 | 0 | 35 | 177 |
|
||||
| [cleonos/c/apps/append\_main.c](/cleonos/c/apps/append_main.c) | C | 74 | 0 | 18 | 92 |
|
||||
| [cleonos/c/apps/args\_main.c](/cleonos/c/apps/args_main.c) | C | 49 | 0 | 13 | 62 |
|
||||
| [cleonos/c/apps/bg\_main.c](/cleonos/c/apps/bg_main.c) | C | 101 | 0 | 26 | 127 |
|
||||
| [cleonos/c/apps/cat\_main.c](/cleonos/c/apps/cat_main.c) | C | 83 | 0 | 24 | 107 |
|
||||
| [cleonos/c/apps/cd\_main.c](/cleonos/c/apps/cd_main.c) | C | 54 | 0 | 15 | 69 |
|
||||
| [cleonos/c/apps/clear\_main.c](/cleonos/c/apps/clear_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/apps/cmd\_runtime.c](/cleonos/c/apps/cmd_runtime.c) | C | 446 | 0 | 143 | 589 |
|
||||
| [cleonos/c/apps/cmd\_runtime.h](/cleonos/c/apps/cmd_runtime.h) | C++ | 80 | 0 | 19 | 99 |
|
||||
| [cleonos/c/apps/cp\_main.c](/cleonos/c/apps/cp_main.c) | C | 95 | 0 | 26 | 121 |
|
||||
| [cleonos/c/apps/cut\_main.c](/cleonos/c/apps/cut_main.c) | C | 214 | 1 | 55 | 270 |
|
||||
| [cleonos/c/apps/dmesg\_main.c](/cleonos/c/apps/dmesg_main.c) | C | 64 | 0 | 18 | 82 |
|
||||
| [cleonos/c/apps/elfrunner\_kmain.c](/cleonos/c/apps/elfrunner_kmain.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/elfrunner\_main.c](/cleonos/c/apps/elfrunner_main.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/exec\_main.c](/cleonos/c/apps/exec_main.c) | C | 87 | 0 | 22 | 109 |
|
||||
| [cleonos/c/apps/exit\_main.c](/cleonos/c/apps/exit_main.c) | C | 54 | 0 | 14 | 68 |
|
||||
| [cleonos/c/apps/fastfetch\_main.c](/cleonos/c/apps/fastfetch_main.c) | C | 180 | 0 | 34 | 214 |
|
||||
| [cleonos/c/apps/fg\_main.c](/cleonos/c/apps/fg_main.c) | C | 150 | 0 | 36 | 186 |
|
||||
| [cleonos/c/apps/fsstat\_main.c](/cleonos/c/apps/fsstat_main.c) | C | 45 | 0 | 11 | 56 |
|
||||
| [cleonos/c/apps/grep\_main.c](/cleonos/c/apps/grep_main.c) | C | 195 | 0 | 54 | 249 |
|
||||
| [cleonos/c/apps/head\_main.c](/cleonos/c/apps/head_main.c) | C | 164 | 0 | 47 | 211 |
|
||||
| [cleonos/c/apps/hello\_main.c](/cleonos/c/apps/hello_main.c) | C | 6 | 0 | 2 | 8 |
|
||||
| [cleonos/c/apps/help\_main.c](/cleonos/c/apps/help_main.c) | C | 79 | 0 | 10 | 89 |
|
||||
| [cleonos/c/apps/jobs\_main.c](/cleonos/c/apps/jobs_main.c) | C | 120 | 0 | 26 | 146 |
|
||||
| [cleonos/c/apps/kbdstat\_main.c](/cleonos/c/apps/kbdstat_main.c) | C | 44 | 0 | 11 | 55 |
|
||||
| [cleonos/c/apps/kdbg\_main.c](/cleonos/c/apps/kdbg_main.c) | C | 214 | 0 | 56 | 270 |
|
||||
| [cleonos/c/apps/kill\_main.c](/cleonos/c/apps/kill_main.c) | C | 144 | 0 | 39 | 183 |
|
||||
| [cleonos/c/apps/ls\_main.c](/cleonos/c/apps/ls_main.c) | C | 262 | 0 | 76 | 338 |
|
||||
| [cleonos/c/apps/memc\_kmain.c](/cleonos/c/apps/memc_kmain.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/memc\_main.c](/cleonos/c/apps/memc_main.c) | C | 8 | 0 | 3 | 11 |
|
||||
| [cleonos/c/apps/memstat\_main.c](/cleonos/c/apps/memstat_main.c) | C | 43 | 0 | 11 | 54 |
|
||||
| [cleonos/c/apps/mkdir\_main.c](/cleonos/c/apps/mkdir_main.c) | C | 57 | 0 | 16 | 73 |
|
||||
| [cleonos/c/apps/mv\_main.c](/cleonos/c/apps/mv_main.c) | C | 102 | 0 | 28 | 130 |
|
||||
| [cleonos/c/apps/pid\_main.c](/cleonos/c/apps/pid_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/apps/ps\_main.c](/cleonos/c/apps/ps_main.c) | C | 160 | 0 | 35 | 195 |
|
||||
| [cleonos/c/apps/pwd\_main.c](/cleonos/c/apps/pwd_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/apps/restart\_main.c](/cleonos/c/apps/restart_main.c) | C | 40 | 0 | 11 | 51 |
|
||||
| [cleonos/c/apps/rm\_main.c](/cleonos/c/apps/rm_main.c) | C | 57 | 0 | 16 | 73 |
|
||||
| [cleonos/c/apps/shell/shell\_cmd.c](/cleonos/c/apps/shell/shell_cmd.c) | C | 2,314 | 0 | 574 | 2,888 |
|
||||
| [cleonos/c/apps/shell/shell\_external.c](/cleonos/c/apps/shell/shell_external.c) | C | 166 | 0 | 55 | 221 |
|
||||
| [cleonos/c/apps/shell/shell\_input.c](/cleonos/c/apps/shell/shell_input.c) | C | 514 | 0 | 132 | 646 |
|
||||
| [cleonos/c/apps/shell/shell\_internal.h](/cleonos/c/apps/shell/shell_internal.h) | C++ | 92 | 0 | 20 | 112 |
|
||||
| [cleonos/c/apps/shell/shell\_path.c](/cleonos/c/apps/shell/shell_path.c) | C | 153 | 0 | 50 | 203 |
|
||||
| [cleonos/c/apps/shell/shell\_script.c](/cleonos/c/apps/shell/shell_script.c) | C | 35 | 0 | 12 | 47 |
|
||||
| [cleonos/c/apps/shell/shell\_util.c](/cleonos/c/apps/shell/shell_util.c) | C | 283 | 0 | 86 | 369 |
|
||||
| [cleonos/c/apps/shell\_main.c](/cleonos/c/apps/shell_main.c) | C | 19 | 0 | 6 | 25 |
|
||||
| [cleonos/c/apps/shstat\_main.c](/cleonos/c/apps/shstat_main.c) | C | 45 | 0 | 11 | 56 |
|
||||
| [cleonos/c/apps/shutdown\_main.c](/cleonos/c/apps/shutdown_main.c) | C | 40 | 0 | 11 | 51 |
|
||||
| [cleonos/c/apps/sleep\_main.c](/cleonos/c/apps/sleep_main.c) | C | 52 | 0 | 14 | 66 |
|
||||
| [cleonos/c/apps/sort\_main.c](/cleonos/c/apps/sort_main.c) | C | 205 | 0 | 63 | 268 |
|
||||
| [cleonos/c/apps/spawn\_main.c](/cleonos/c/apps/spawn_main.c) | C | 76 | 0 | 20 | 96 |
|
||||
| [cleonos/c/apps/spin\_main.c](/cleonos/c/apps/spin_main.c) | C | 13 | 0 | 4 | 17 |
|
||||
| [cleonos/c/apps/stats\_main.c](/cleonos/c/apps/stats_main.c) | C | 102 | 0 | 17 | 119 |
|
||||
| [cleonos/c/apps/tail\_main.c](/cleonos/c/apps/tail_main.c) | C | 190 | 0 | 54 | 244 |
|
||||
| [cleonos/c/apps/taskstat\_main.c](/cleonos/c/apps/taskstat_main.c) | C | 43 | 0 | 11 | 54 |
|
||||
| [cleonos/c/apps/top\_main.c](/cleonos/c/apps/top_main.c) | C | 195 | 0 | 47 | 242 |
|
||||
| [cleonos/c/apps/touch\_main.c](/cleonos/c/apps/touch_main.c) | C | 58 | 0 | 16 | 74 |
|
||||
| [cleonos/c/apps/tty\_main.c](/cleonos/c/apps/tty_main.c) | C | 64 | 0 | 17 | 81 |
|
||||
| [cleonos/c/apps/ttydrv\_main.c](/cleonos/c/apps/ttydrv_main.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/uniq\_main.c](/cleonos/c/apps/uniq_main.c) | C | 168 | 0 | 48 | 216 |
|
||||
| [cleonos/c/apps/userstat\_main.c](/cleonos/c/apps/userstat_main.c) | C | 48 | 0 | 11 | 59 |
|
||||
| [cleonos/c/apps/wait\_main.c](/cleonos/c/apps/wait_main.c) | C | 68 | 0 | 17 | 85 |
|
||||
| [cleonos/c/apps/wavplay\_main.c](/cleonos/c/apps/wavplay_main.c) | C | 396 | 0 | 99 | 495 |
|
||||
| [cleonos/c/apps/wc\_main.c](/cleonos/c/apps/wc_main.c) | C | 164 | 0 | 45 | 209 |
|
||||
| [cleonos/c/apps/write\_main.c](/cleonos/c/apps/write_main.c) | C | 74 | 0 | 18 | 92 |
|
||||
| [cleonos/c/apps/yield\_main.c](/cleonos/c/apps/yield_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/include/cleonos\_rust\_bridge.h](/cleonos/c/include/cleonos_rust_bridge.h) | C++ | 6 | 0 | 4 | 10 |
|
||||
| [cleonos/c/include/cleonos\_syscall.h](/cleonos/c/include/cleonos_syscall.h) | C++ | 168 | 0 | 9 | 177 |
|
||||
| [cleonos/c/src/runtime.c](/cleonos/c/src/runtime.c) | C | 37 | 0 | 12 | 49 |
|
||||
| [cleonos/c/src/syscall.c](/cleonos/c/src/syscall.c) | C | 223 | 0 | 74 | 297 |
|
||||
| [cleonos/c/stub.c](/cleonos/c/stub.c) | C | 3 | 4 | 2 | 9 |
|
||||
| [cleonos/rust/src/lib.rs](/cleonos/rust/src/lib.rs) | Rust | 23 | 0 | 9 | 32 |
|
||||
| [clks/arch/aarch64/boot.c](/clks/arch/aarch64/boot.c) | C | 6 | 0 | 1 | 7 |
|
||||
| [clks/arch/x86\_64/boot.c](/clks/arch/x86_64/boot.c) | C | 6 | 0 | 1 | 7 |
|
||||
| [clks/arch/x86\_64/exec\_stack\_call.S](/clks/arch/x86_64/exec_stack_call.S) | Go Assembly | 40 | 0 | 8 | 48 |
|
||||
| [clks/arch/x86\_64/interrupt\_stubs.S](/clks/arch/x86_64/interrupt_stubs.S) | Go Assembly | 108 | 0 | 12 | 120 |
|
||||
| [clks/drivers/audio/pcspeaker.c](/clks/drivers/audio/pcspeaker.c) | C | 101 | 0 | 25 | 126 |
|
||||
| [clks/drivers/serial/serial.c](/clks/drivers/serial/serial.c) | C | 52 | 0 | 16 | 68 |
|
||||
| [clks/drivers/video/font8x8.c](/clks/drivers/video/font8x8.c) | C | 67 | 0 | 8 | 75 |
|
||||
| [clks/drivers/video/font8x8.h](/clks/drivers/video/font8x8.h) | C++ | 5 | 0 | 3 | 8 |
|
||||
| [clks/drivers/video/framebuffer.c](/clks/drivers/video/framebuffer.c) | C | 251 | 0 | 70 | 321 |
|
||||
| [clks/drivers/video/psf\_font.c](/clks/drivers/video/psf_font.c) | C | 230 | 0 | 56 | 286 |
|
||||
| [clks/drivers/video/psf\_font.h](/clks/drivers/video/psf_font.h) | C++ | 15 | 0 | 5 | 20 |
|
||||
| [clks/include/clks/audio.h](/clks/include/clks/audio.h) | C++ | 9 | 0 | 3 | 12 |
|
||||
| [clks/include/clks/boot.h](/clks/include/clks/boot.h) | C++ | 11 | 0 | 4 | 15 |
|
||||
| [clks/include/clks/compiler.h](/clks/include/clks/compiler.h) | C++ | 13 | 0 | 4 | 17 |
|
||||
| [clks/include/clks/cpu.h](/clks/include/clks/cpu.h) | C++ | 20 | 0 | 4 | 24 |
|
||||
| [clks/include/clks/desktop.h](/clks/include/clks/desktop.h) | C++ | 7 | 0 | 4 | 11 |
|
||||
| [clks/include/clks/driver.h](/clks/include/clks/driver.h) | C++ | 29 | 0 | 8 | 37 |
|
||||
| [clks/include/clks/elf64.h](/clks/include/clks/elf64.h) | C++ | 32 | 0 | 9 | 41 |
|
||||
| [clks/include/clks/elfrunner.h](/clks/include/clks/elfrunner.h) | C++ | 6 | 0 | 3 | 9 |
|
||||
| [clks/include/clks/exec.h](/clks/include/clks/exec.h) | C++ | 66 | 0 | 8 | 74 |
|
||||
| [clks/include/clks/framebuffer.h](/clks/include/clks/framebuffer.h) | C++ | 26 | 0 | 6 | 32 |
|
||||
| [clks/include/clks/fs.h](/clks/include/clks/fs.h) | C++ | 23 | 0 | 7 | 30 |
|
||||
| [clks/include/clks/heap.h](/clks/include/clks/heap.h) | C++ | 15 | 0 | 4 | 19 |
|
||||
| [clks/include/clks/interrupts.h](/clks/include/clks/interrupts.h) | C++ | 6 | 0 | 3 | 9 |
|
||||
| [clks/include/clks/kelf.h](/clks/include/clks/kelf.h) | C++ | 9 | 0 | 5 | 14 |
|
||||
| [clks/include/clks/kernel.h](/clks/include/clks/kernel.h) | C++ | 4 | 0 | 2 | 6 |
|
||||
| [clks/include/clks/keyboard.h](/clks/include/clks/keyboard.h) | C++ | 27 | 0 | 6 | 33 |
|
||||
| [clks/include/clks/limine.h](/clks/include/clks/limine.h) | C++ | 132 | 0 | 24 | 156 |
|
||||
| [clks/include/clks/log.h](/clks/include/clks/log.h) | C++ | 14 | 0 | 5 | 19 |
|
||||
| [clks/include/clks/mouse.h](/clks/include/clks/mouse.h) | C++ | 20 | 0 | 6 | 26 |
|
||||
| [clks/include/clks/panic.h](/clks/include/clks/panic.h) | C++ | 12 | 0 | 4 | 16 |
|
||||
| [clks/include/clks/pmm.h](/clks/include/clks/pmm.h) | C++ | 16 | 0 | 5 | 21 |
|
||||
| [clks/include/clks/ramdisk.h](/clks/include/clks/ramdisk.h) | C++ | 17 | 0 | 8 | 25 |
|
||||
| [clks/include/clks/scheduler.h](/clks/include/clks/scheduler.h) | C++ | 18 | 0 | 5 | 23 |
|
||||
| [clks/include/clks/serial.h](/clks/include/clks/serial.h) | C++ | 6 | 0 | 2 | 8 |
|
||||
| [clks/include/clks/service.h](/clks/include/clks/service.h) | C++ | 31 | 0 | 8 | 39 |
|
||||
| [clks/include/clks/shell.h](/clks/include/clks/shell.h) | C++ | 7 | 0 | 3 | 10 |
|
||||
| [clks/include/clks/string.h](/clks/include/clks/string.h) | C++ | 9 | 0 | 3 | 12 |
|
||||
| [clks/include/clks/syscall.h](/clks/include/clks/syscall.h) | C++ | 75 | 0 | 5 | 80 |
|
||||
| [clks/include/clks/task.h](/clks/include/clks/task.h) | C++ | 24 | 0 | 7 | 31 |
|
||||
| [clks/include/clks/tty.h](/clks/include/clks/tty.h) | C++ | 14 | 0 | 4 | 18 |
|
||||
| [clks/include/clks/types.h](/clks/include/clks/types.h) | C++ | 17 | 0 | 6 | 23 |
|
||||
| [clks/include/clks/userland.h](/clks/include/clks/userland.h) | C++ | 12 | 0 | 4 | 16 |
|
||||
| [clks/kernel/desktop.c](/clks/kernel/desktop.c) | C | 321 | 0 | 86 | 407 |
|
||||
| [clks/kernel/driver.c](/clks/kernel/driver.c) | C | 169 | 0 | 49 | 218 |
|
||||
| [clks/kernel/elf64.c](/clks/kernel/elf64.c) | C | 239 | 0 | 73 | 312 |
|
||||
| [clks/kernel/elfrunner.c](/clks/kernel/elfrunner.c) | C | 30 | 0 | 8 | 38 |
|
||||
| [clks/kernel/exec.c](/clks/kernel/exec.c) | C | 1,203 | 1 | 335 | 1,539 |
|
||||
| [clks/kernel/fs.c](/clks/kernel/fs.c) | C | 698 | 0 | 220 | 918 |
|
||||
| [clks/kernel/heap.c](/clks/kernel/heap.c) | C | 134 | 0 | 42 | 176 |
|
||||
| [clks/kernel/interrupts.c](/clks/kernel/interrupts.c) | C | 317 | 0 | 44 | 361 |
|
||||
| [clks/kernel/kelf.c](/clks/kernel/kelf.c) | C | 203 | 1 | 53 | 257 |
|
||||
| [clks/kernel/keyboard.c](/clks/kernel/keyboard.c) | C | 351 | 0 | 88 | 439 |
|
||||
| [clks/kernel/kmain.c](/clks/kernel/kmain.c) | C | 200 | 1 | 52 | 253 |
|
||||
| [clks/kernel/limine\_requests.c](/clks/kernel/limine_requests.c) | C | 76 | 0 | 26 | 102 |
|
||||
| [clks/kernel/log.c](/clks/kernel/log.c) | C | 185 | 0 | 48 | 233 |
|
||||
| [clks/kernel/mouse.c](/clks/kernel/mouse.c) | C | 246 | 0 | 63 | 309 |
|
||||
| [clks/kernel/panic.c](/clks/kernel/panic.c) | C | 546 | 0 | 155 | 701 |
|
||||
| [clks/kernel/pmm.c](/clks/kernel/pmm.c) | C | 82 | 0 | 23 | 105 |
|
||||
| [clks/kernel/ramdisk.c](/clks/kernel/ramdisk.c) | C | 172 | 0 | 50 | 222 |
|
||||
| [clks/kernel/scheduler.c](/clks/kernel/scheduler.c) | C | 136 | 0 | 44 | 180 |
|
||||
| [clks/kernel/service.c](/clks/kernel/service.c) | C | 113 | 0 | 34 | 147 |
|
||||
| [clks/kernel/shell.c](/clks/kernel/shell.c) | C | 1,249 | 0 | 317 | 1,566 |
|
||||
| [clks/kernel/syscall.c](/clks/kernel/syscall.c) | C | 1,375 | 0 | 344 | 1,719 |
|
||||
| [clks/kernel/tty.c](/clks/kernel/tty.c) | C | 1,115 | 0 | 275 | 1,390 |
|
||||
| [clks/kernel/userland.c](/clks/kernel/userland.c) | C | 124 | 0 | 35 | 159 |
|
||||
| [clks/lib/libc\_compat.c](/clks/lib/libc_compat.c) | C | 25 | 0 | 7 | 32 |
|
||||
| [clks/lib/string.c](/clks/lib/string.c) | C | 54 | 0 | 16 | 70 |
|
||||
| [clks/rust/src/lib.rs](/clks/rust/src/lib.rs) | Rust | 21 | 0 | 6 | 27 |
|
||||
| [cmake/check\_tools.cmake](/cmake/check_tools.cmake) | CMake | 34 | 0 | 7 | 41 |
|
||||
| [cmake/gen\_kernel\_symbols.cmake](/cmake/gen_kernel_symbols.cmake) | CMake | 80 | 0 | 26 | 106 |
|
||||
| [cmake/log.cmake](/cmake/log.cmake) | CMake | 30 | 0 | 6 | 36 |
|
||||
| [cmake/log\_emit.cmake](/cmake/log_emit.cmake) | CMake | 23 | 0 | 6 | 29 |
|
||||
| [cmake/setup\_limine.cmake](/cmake/setup_limine.cmake) | CMake | 100 | 0 | 19 | 119 |
|
||||
| [configs/limine.conf](/configs/limine.conf) | Properties | 6 | 0 | 1 | 7 |
|
||||
| [docs/README.md](/docs/README.md) | Markdown | 31 | 0 | 4 | 35 |
|
||||
| [docs/stage1.md](/docs/stage1.md) | Markdown | 41 | 0 | 5 | 46 |
|
||||
| [docs/stage10.md](/docs/stage10.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage11.md](/docs/stage11.md) | Markdown | 36 | 0 | 5 | 41 |
|
||||
| [docs/stage12.md](/docs/stage12.md) | Markdown | 40 | 0 | 6 | 46 |
|
||||
| [docs/stage13.md](/docs/stage13.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage14.md](/docs/stage14.md) | Markdown | 44 | 0 | 8 | 52 |
|
||||
| [docs/stage15.md](/docs/stage15.md) | Markdown | 47 | 0 | 7 | 54 |
|
||||
| [docs/stage2.md](/docs/stage2.md) | Markdown | 30 | 0 | 5 | 35 |
|
||||
| [docs/stage20.md](/docs/stage20.md) | Markdown | 46 | 0 | 6 | 52 |
|
||||
| [docs/stage21.md](/docs/stage21.md) | Markdown | 72 | 0 | 7 | 79 |
|
||||
| [docs/stage22.md](/docs/stage22.md) | Markdown | 68 | 0 | 7 | 75 |
|
||||
| [docs/stage23.md](/docs/stage23.md) | Markdown | 41 | 0 | 6 | 47 |
|
||||
| [docs/stage24.md](/docs/stage24.md) | Markdown | 42 | 0 | 7 | 49 |
|
||||
| [docs/stage25.md](/docs/stage25.md) | Markdown | 58 | 0 | 7 | 65 |
|
||||
| [docs/stage26.md](/docs/stage26.md) | Markdown | 32 | 0 | 7 | 39 |
|
||||
| [docs/stage27.md](/docs/stage27.md) | Markdown | 32 | 0 | 7 | 39 |
|
||||
| [docs/stage28.md](/docs/stage28.md) | Markdown | 37 | 0 | 7 | 44 |
|
||||
| [docs/stage29.md](/docs/stage29.md) | Markdown | 33 | 0 | 7 | 40 |
|
||||
| [docs/stage3.md](/docs/stage3.md) | Markdown | 29 | 0 | 5 | 34 |
|
||||
| [docs/stage4.md](/docs/stage4.md) | Markdown | 30 | 0 | 5 | 35 |
|
||||
| [docs/stage5.md](/docs/stage5.md) | Markdown | 29 | 0 | 5 | 34 |
|
||||
| [docs/stage6.md](/docs/stage6.md) | Markdown | 30 | 0 | 6 | 36 |
|
||||
| [docs/stage7.md](/docs/stage7.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage8.md](/docs/stage8.md) | Markdown | 31 | 0 | 6 | 37 |
|
||||
| [docs/stage9.md](/docs/stage9.md) | Markdown | 31 | 0 | 6 | 37 |
|
||||
| [docs/syscall.md](/docs/syscall.md) | Markdown | 380 | 0 | 168 | 548 |
|
||||
| [ramdisk/shell/init.cmd](/ramdisk/shell/init.cmd) | Batch | 4 | 0 | 2 | 6 |
|
||||
| [scripts/gen-tty-psf.ps1](/scripts/gen-tty-psf.ps1) | PowerShell | 171 | 2 | 42 | 215 |
|
||||
| [wine/README.md](/wine/README.md) | Markdown | 49 | 0 | 19 | 68 |
|
||||
| [wine/cleonos\_wine.py](/wine/cleonos_wine.py) | Python | 3 | 1 | 3 | 7 |
|
||||
| [wine/cleonos\_wine\_lib/\_\_init\_\_.py](/wine/cleonos_wine_lib/__init__.py) | Python | 4 | 0 | 1 | 5 |
|
||||
| [wine/cleonos\_wine\_lib/cli.py](/wine/cleonos_wine_lib/cli.py) | Python | 44 | 0 | 10 | 54 |
|
||||
| [wine/cleonos\_wine\_lib/constants.py](/wine/cleonos_wine_lib/constants.py) | Python | 76 | 1 | 11 | 88 |
|
||||
| [wine/cleonos\_wine\_lib/input\_pump.py](/wine/cleonos_wine_lib/input_pump.py) | Python | 82 | 0 | 17 | 99 |
|
||||
| [wine/cleonos\_wine\_lib/platform.py](/wine/cleonos_wine_lib/platform.py) | Python | 55 | 0 | 5 | 60 |
|
||||
| [wine/cleonos\_wine\_lib/runner.py](/wine/cleonos_wine_lib/runner.py) | Python | 990 | 0 | 175 | 1,165 |
|
||||
| [wine/cleonos\_wine\_lib/state.py](/wine/cleonos_wine_lib/state.py) | Python | 164 | 0 | 40 | 204 |
|
||||
| [wine/requirements.txt](/wine/requirements.txt) | pip requirements | 1 | 0 | 1 | 2 |
|
||||
|
||||
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
42
.VSCodeCounter/2026-04-17_19-36-06/diff-details.md
Normal file
42
.VSCodeCounter/2026-04-17_19-36-06/diff-details.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Diff Details
|
||||
|
||||
Date : 2026-04-17 19:36:06
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 27 files, 2979 codes, 1 comments, 752 blanks, all 3732 lines
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
||||
|
||||
## Files
|
||||
| filename | language | code | comment | blank | total |
|
||||
| :--- | :--- | ---: | ---: | ---: | ---: |
|
||||
| [CMakeLists.txt](/CMakeLists.txt) | CMake | 27 | 0 | 2 | 29 |
|
||||
| [cleonos/c/apps/bg\_main.c](/cleonos/c/apps/bg_main.c) | C | 101 | 0 | 26 | 127 |
|
||||
| [cleonos/c/apps/fg\_main.c](/cleonos/c/apps/fg_main.c) | C | 150 | 0 | 36 | 186 |
|
||||
| [cleonos/c/apps/help\_main.c](/cleonos/c/apps/help_main.c) | C | 4 | 0 | 0 | 4 |
|
||||
| [cleonos/c/apps/jobs\_main.c](/cleonos/c/apps/jobs_main.c) | C | 120 | 0 | 26 | 146 |
|
||||
| [cleonos/c/apps/kdbg\_main.c](/cleonos/c/apps/kdbg_main.c) | C | 214 | 0 | 56 | 270 |
|
||||
| [cleonos/c/apps/kill\_main.c](/cleonos/c/apps/kill_main.c) | C | 144 | 0 | 39 | 183 |
|
||||
| [cleonos/c/apps/ps\_main.c](/cleonos/c/apps/ps_main.c) | C | 160 | 0 | 35 | 195 |
|
||||
| [cleonos/c/apps/shell/shell\_cmd.c](/cleonos/c/apps/shell/shell_cmd.c) | C | 3 | 0 | 0 | 3 |
|
||||
| [cleonos/c/apps/spin\_main.c](/cleonos/c/apps/spin_main.c) | C | 13 | 0 | 4 | 17 |
|
||||
| [cleonos/c/apps/top\_main.c](/cleonos/c/apps/top_main.c) | C | 195 | 0 | 47 | 242 |
|
||||
| [cleonos/c/include/cleonos\_syscall.h](/cleonos/c/include/cleonos_syscall.h) | C++ | 40 | 0 | 3 | 43 |
|
||||
| [cleonos/c/src/syscall.c](/cleonos/c/src/syscall.c) | C | 32 | 0 | 10 | 42 |
|
||||
| [clks/arch/x86\_64/exec\_stack\_call.S](/clks/arch/x86_64/exec_stack_call.S) | Go Assembly | 18 | 0 | 0 | 18 |
|
||||
| [clks/include/clks/exec.h](/clks/include/clks/exec.h) | C++ | 32 | 0 | 4 | 36 |
|
||||
| [clks/include/clks/panic.h](/clks/include/clks/panic.h) | C++ | 5 | 0 | 1 | 6 |
|
||||
| [clks/include/clks/syscall.h](/clks/include/clks/syscall.h) | C++ | 7 | 0 | 0 | 7 |
|
||||
| [clks/kernel/exec.c](/clks/kernel/exec.c) | C | 349 | 1 | 98 | 448 |
|
||||
| [clks/kernel/interrupts.c](/clks/kernel/interrupts.c) | C | 6 | 0 | 0 | 6 |
|
||||
| [clks/kernel/keyboard.c](/clks/kernel/keyboard.c) | C | 40 | 0 | 9 | 49 |
|
||||
| [clks/kernel/log.c](/clks/kernel/log.c) | C | 62 | 0 | 15 | 77 |
|
||||
| [clks/kernel/panic.c](/clks/kernel/panic.c) | C | 367 | 0 | 95 | 462 |
|
||||
| [clks/kernel/syscall.c](/clks/kernel/syscall.c) | C | 756 | 0 | 204 | 960 |
|
||||
| [cmake/check\_tools.cmake](/cmake/check_tools.cmake) | CMake | 2 | 0 | 1 | 3 |
|
||||
| [cmake/gen\_kernel\_symbols.cmake](/cmake/gen_kernel_symbols.cmake) | CMake | 80 | 0 | 26 | 106 |
|
||||
| [cmake/setup\_limine.cmake](/cmake/setup_limine.cmake) | CMake | 0 | 0 | 1 | 1 |
|
||||
| [docs/syscall.md](/docs/syscall.md) | Markdown | 52 | 0 | 14 | 66 |
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
||||
29
.VSCodeCounter/2026-04-17_19-36-06/diff.csv
Normal file
29
.VSCodeCounter/2026-04-17_19-36-06/diff.csv
Normal file
@@ -0,0 +1,29 @@
|
||||
"filename", "language", "CMake", "Markdown", "C", "C++", "Go Assembly", "comment", "blank", "total"
|
||||
"d:\Projects\C\cleonos\CMakeLists.txt", "CMake", 27, 0, 0, 0, 0, 0, 2, 29
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\bg_main.c", "C", 0, 0, 101, 0, 0, 0, 26, 127
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fg_main.c", "C", 0, 0, 150, 0, 0, 0, 36, 186
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\help_main.c", "C", 0, 0, 4, 0, 0, 0, 0, 4
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\jobs_main.c", "C", 0, 0, 120, 0, 0, 0, 26, 146
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\kdbg_main.c", "C", 0, 0, 214, 0, 0, 0, 56, 270
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\kill_main.c", "C", 0, 0, 144, 0, 0, 0, 39, 183
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ps_main.c", "C", 0, 0, 160, 0, 0, 0, 35, 195
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c", "C", 0, 0, 3, 0, 0, 0, 0, 3
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\spin_main.c", "C", 0, 0, 13, 0, 0, 0, 4, 17
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\top_main.c", "C", 0, 0, 195, 0, 0, 0, 47, 242
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h", "C++", 0, 0, 0, 40, 0, 0, 3, 43
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\syscall.c", "C", 0, 0, 32, 0, 0, 0, 10, 42
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\exec_stack_call.S", "Go Assembly", 0, 0, 0, 0, 18, 0, 0, 18
|
||||
"d:\Projects\C\cleonos\clks\include\clks\exec.h", "C++", 0, 0, 0, 32, 0, 0, 4, 36
|
||||
"d:\Projects\C\cleonos\clks\include\clks\panic.h", "C++", 0, 0, 0, 5, 0, 0, 1, 6
|
||||
"d:\Projects\C\cleonos\clks\include\clks\syscall.h", "C++", 0, 0, 0, 7, 0, 0, 0, 7
|
||||
"d:\Projects\C\cleonos\clks\kernel\exec.c", "C", 0, 0, 349, 0, 0, 1, 98, 448
|
||||
"d:\Projects\C\cleonos\clks\kernel\interrupts.c", "C", 0, 0, 6, 0, 0, 0, 0, 6
|
||||
"d:\Projects\C\cleonos\clks\kernel\keyboard.c", "C", 0, 0, 40, 0, 0, 0, 9, 49
|
||||
"d:\Projects\C\cleonos\clks\kernel\log.c", "C", 0, 0, 62, 0, 0, 0, 15, 77
|
||||
"d:\Projects\C\cleonos\clks\kernel\panic.c", "C", 0, 0, 367, 0, 0, 0, 95, 462
|
||||
"d:\Projects\C\cleonos\clks\kernel\syscall.c", "C", 0, 0, 756, 0, 0, 0, 204, 960
|
||||
"d:\Projects\C\cleonos\cmake\check_tools.cmake", "CMake", 2, 0, 0, 0, 0, 0, 1, 3
|
||||
"d:\Projects\C\cleonos\cmake\gen_kernel_symbols.cmake", "CMake", 80, 0, 0, 0, 0, 0, 26, 106
|
||||
"d:\Projects\C\cleonos\cmake\setup_limine.cmake", "CMake", 0, 0, 0, 0, 0, 0, 1, 1
|
||||
"d:\Projects\C\cleonos\docs\syscall.md", "Markdown", 0, 52, 0, 0, 0, 0, 14, 66
|
||||
"Total", "-", 109, 52, 2716, 84, 18, 1, 752, 3732
|
||||
|
41
.VSCodeCounter/2026-04-17_19-36-06/diff.md
Normal file
41
.VSCodeCounter/2026-04-17_19-36-06/diff.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Diff Summary
|
||||
|
||||
Date : 2026-04-17 19:36:06
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 27 files, 2979 codes, 1 comments, 752 blanks, all 3732 lines
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
||||
|
||||
## Languages
|
||||
| language | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| C | 17 | 2,716 | 1 | 700 | 3,417 |
|
||||
| CMake | 4 | 109 | 0 | 30 | 139 |
|
||||
| C++ | 4 | 84 | 0 | 8 | 92 |
|
||||
| Markdown | 1 | 52 | 0 | 14 | 66 |
|
||||
| Go Assembly | 1 | 18 | 0 | 0 | 18 |
|
||||
|
||||
## Directories
|
||||
| path | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| . | 27 | 2,979 | 1 | 752 | 3,732 |
|
||||
| . (Files) | 1 | 27 | 0 | 2 | 29 |
|
||||
| cleonos | 12 | 1,176 | 0 | 282 | 1,458 |
|
||||
| cleonos\\c | 12 | 1,176 | 0 | 282 | 1,458 |
|
||||
| cleonos\\c\\apps | 10 | 1,104 | 0 | 269 | 1,373 |
|
||||
| cleonos\\c\\apps (Files) | 9 | 1,101 | 0 | 269 | 1,370 |
|
||||
| cleonos\\c\\apps\\shell | 1 | 3 | 0 | 0 | 3 |
|
||||
| cleonos\\c\\include | 1 | 40 | 0 | 3 | 43 |
|
||||
| cleonos\\c\\src | 1 | 32 | 0 | 10 | 42 |
|
||||
| clks | 10 | 1,642 | 1 | 426 | 2,069 |
|
||||
| clks\\arch | 1 | 18 | 0 | 0 | 18 |
|
||||
| clks\\arch\\x86_64 | 1 | 18 | 0 | 0 | 18 |
|
||||
| clks\\include | 3 | 44 | 0 | 5 | 49 |
|
||||
| clks\\include\\clks | 3 | 44 | 0 | 5 | 49 |
|
||||
| clks\\kernel | 6 | 1,580 | 1 | 421 | 2,002 |
|
||||
| cmake | 3 | 82 | 0 | 28 | 110 |
|
||||
| docs | 1 | 52 | 0 | 14 | 66 |
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
||||
71
.VSCodeCounter/2026-04-17_19-36-06/diff.txt
Normal file
71
.VSCodeCounter/2026-04-17_19-36-06/diff.txt
Normal file
@@ -0,0 +1,71 @@
|
||||
Date : 2026-04-17 19:36:06
|
||||
Directory : d:\Projects\C\cleonos
|
||||
Total : 27 files, 2979 codes, 1 comments, 752 blanks, all 3732 lines
|
||||
|
||||
Languages
|
||||
+-------------+------------+------------+------------+------------+------------+
|
||||
| language | files | code | comment | blank | total |
|
||||
+-------------+------------+------------+------------+------------+------------+
|
||||
| C | 17 | 2,716 | 1 | 700 | 3,417 |
|
||||
| CMake | 4 | 109 | 0 | 30 | 139 |
|
||||
| C++ | 4 | 84 | 0 | 8 | 92 |
|
||||
| Markdown | 1 | 52 | 0 | 14 | 66 |
|
||||
| Go Assembly | 1 | 18 | 0 | 0 | 18 |
|
||||
+-------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Directories
|
||||
+-----------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| path | files | code | comment | blank | total |
|
||||
+-----------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| . | 27 | 2,979 | 1 | 752 | 3,732 |
|
||||
| . (Files) | 1 | 27 | 0 | 2 | 29 |
|
||||
| cleonos | 12 | 1,176 | 0 | 282 | 1,458 |
|
||||
| cleonos\c | 12 | 1,176 | 0 | 282 | 1,458 |
|
||||
| cleonos\c\apps | 10 | 1,104 | 0 | 269 | 1,373 |
|
||||
| cleonos\c\apps (Files) | 9 | 1,101 | 0 | 269 | 1,370 |
|
||||
| cleonos\c\apps\shell | 1 | 3 | 0 | 0 | 3 |
|
||||
| cleonos\c\include | 1 | 40 | 0 | 3 | 43 |
|
||||
| cleonos\c\src | 1 | 32 | 0 | 10 | 42 |
|
||||
| clks | 10 | 1,642 | 1 | 426 | 2,069 |
|
||||
| clks\arch | 1 | 18 | 0 | 0 | 18 |
|
||||
| clks\arch\x86_64 | 1 | 18 | 0 | 0 | 18 |
|
||||
| clks\include | 3 | 44 | 0 | 5 | 49 |
|
||||
| clks\include\clks | 3 | 44 | 0 | 5 | 49 |
|
||||
| clks\kernel | 6 | 1,580 | 1 | 421 | 2,002 |
|
||||
| cmake | 3 | 82 | 0 | 28 | 110 |
|
||||
| docs | 1 | 52 | 0 | 14 | 66 |
|
||||
+-----------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Files
|
||||
+-----------------------------------------------------------+-------------+------------+------------+------------+------------+
|
||||
| filename | language | code | comment | blank | total |
|
||||
+-----------------------------------------------------------+-------------+------------+------------+------------+------------+
|
||||
| d:\Projects\C\cleonos\CMakeLists.txt | CMake | 27 | 0 | 2 | 29 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\bg_main.c | C | 101 | 0 | 26 | 127 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fg_main.c | C | 150 | 0 | 36 | 186 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\help_main.c | C | 4 | 0 | 0 | 4 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\jobs_main.c | C | 120 | 0 | 26 | 146 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\kdbg_main.c | C | 214 | 0 | 56 | 270 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\kill_main.c | C | 144 | 0 | 39 | 183 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ps_main.c | C | 160 | 0 | 35 | 195 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c | C | 3 | 0 | 0 | 3 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\spin_main.c | C | 13 | 0 | 4 | 17 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\top_main.c | C | 195 | 0 | 47 | 242 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h | C++ | 40 | 0 | 3 | 43 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\syscall.c | C | 32 | 0 | 10 | 42 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\exec_stack_call.S | Go Assembly | 18 | 0 | 0 | 18 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\exec.h | C++ | 32 | 0 | 4 | 36 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\panic.h | C++ | 5 | 0 | 1 | 6 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\syscall.h | C++ | 7 | 0 | 0 | 7 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\exec.c | C | 349 | 1 | 98 | 448 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\interrupts.c | C | 6 | 0 | 0 | 6 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\keyboard.c | C | 40 | 0 | 9 | 49 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\log.c | C | 62 | 0 | 15 | 77 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\panic.c | C | 367 | 0 | 95 | 462 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\syscall.c | C | 756 | 0 | 204 | 960 |
|
||||
| d:\Projects\C\cleonos\cmake\check_tools.cmake | CMake | 2 | 0 | 1 | 3 |
|
||||
| d:\Projects\C\cleonos\cmake\gen_kernel_symbols.cmake | CMake | 80 | 0 | 26 | 106 |
|
||||
| d:\Projects\C\cleonos\cmake\setup_limine.cmake | CMake | 0 | 0 | 1 | 1 |
|
||||
| d:\Projects\C\cleonos\docs\syscall.md | Markdown | 52 | 0 | 14 | 66 |
|
||||
| Total | | 2,979 | 1 | 752 | 3,732 |
|
||||
+-----------------------------------------------------------+-------------+------------+------------+------------+------------+
|
||||
194
.VSCodeCounter/2026-04-17_19-36-06/results.csv
Normal file
194
.VSCodeCounter/2026-04-17_19-36-06/results.csv
Normal file
@@ -0,0 +1,194 @@
|
||||
"filename", "language", "Python", "Markdown", "pip requirements", "CMake", "Properties", "PowerShell", "C", "C++", "Rust", "Batch", "Makefile", "Go Assembly", "YAML", "comment", "blank", "total"
|
||||
"d:\Projects\C\cleonos\.github\workflows\build-os.yml", "YAML", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 10, 58
|
||||
"d:\Projects\C\cleonos\CMakeLists.txt", "CMake", 0, 0, 0, 614, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 702
|
||||
"d:\Projects\C\cleonos\Makefile", "Makefile", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 22, 122
|
||||
"d:\Projects\C\cleonos\README.md", "Markdown", 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 126
|
||||
"d:\Projects\C\cleonos\README.zh-CN.md", "Markdown", 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 126
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ansi_main.c", "C", 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 11, 54
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ansitest_main.c", "C", 0, 0, 0, 0, 0, 0, 142, 0, 0, 0, 0, 0, 0, 0, 35, 177
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\append_main.c", "C", 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 18, 92
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\args_main.c", "C", 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 13, 62
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\bg_main.c", "C", 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 0, 26, 127
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cat_main.c", "C", 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, 0, 0, 0, 0, 24, 107
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cd_main.c", "C", 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 15, 69
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\clear_main.c", "C", 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.c", "C", 0, 0, 0, 0, 0, 0, 446, 0, 0, 0, 0, 0, 0, 0, 143, 589
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.h", "C++", 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 19, 99
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cp_main.c", "C", 0, 0, 0, 0, 0, 0, 95, 0, 0, 0, 0, 0, 0, 0, 26, 121
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cut_main.c", "C", 0, 0, 0, 0, 0, 0, 214, 0, 0, 0, 0, 0, 0, 1, 55, 270
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\dmesg_main.c", "C", 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 18, 82
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_kmain.c", "C", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_main.c", "C", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\exec_main.c", "C", 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 22, 109
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\exit_main.c", "C", 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 14, 68
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fastfetch_main.c", "C", 0, 0, 0, 0, 0, 0, 180, 0, 0, 0, 0, 0, 0, 0, 34, 214
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fg_main.c", "C", 0, 0, 0, 0, 0, 0, 150, 0, 0, 0, 0, 0, 0, 0, 36, 186
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fsstat_main.c", "C", 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 11, 56
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\grep_main.c", "C", 0, 0, 0, 0, 0, 0, 195, 0, 0, 0, 0, 0, 0, 0, 54, 249
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\head_main.c", "C", 0, 0, 0, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 0, 47, 211
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\hello_main.c", "C", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 2, 8
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\help_main.c", "C", 0, 0, 0, 0, 0, 0, 79, 0, 0, 0, 0, 0, 0, 0, 10, 89
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\jobs_main.c", "C", 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 26, 146
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\kbdstat_main.c", "C", 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 11, 55
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\kdbg_main.c", "C", 0, 0, 0, 0, 0, 0, 214, 0, 0, 0, 0, 0, 0, 0, 56, 270
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\kill_main.c", "C", 0, 0, 0, 0, 0, 0, 144, 0, 0, 0, 0, 0, 0, 0, 39, 183
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ls_main.c", "C", 0, 0, 0, 0, 0, 0, 262, 0, 0, 0, 0, 0, 0, 0, 76, 338
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memc_kmain.c", "C", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memc_main.c", "C", 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 3, 11
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memstat_main.c", "C", 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 11, 54
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\mkdir_main.c", "C", 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 0, 0, 16, 73
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\mv_main.c", "C", 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 0, 0, 28, 130
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\pid_main.c", "C", 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ps_main.c", "C", 0, 0, 0, 0, 0, 0, 160, 0, 0, 0, 0, 0, 0, 0, 35, 195
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\pwd_main.c", "C", 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\restart_main.c", "C", 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 11, 51
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\rm_main.c", "C", 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 0, 0, 16, 73
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c", "C", 0, 0, 0, 0, 0, 0, 2314, 0, 0, 0, 0, 0, 0, 0, 574, 2888
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_external.c", "C", 0, 0, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 55, 221
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c", "C", 0, 0, 0, 0, 0, 0, 514, 0, 0, 0, 0, 0, 0, 0, 132, 646
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_internal.h", "C++", 0, 0, 0, 0, 0, 0, 0, 92, 0, 0, 0, 0, 0, 0, 20, 112
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_path.c", "C", 0, 0, 0, 0, 0, 0, 153, 0, 0, 0, 0, 0, 0, 0, 50, 203
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_script.c", "C", 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 12, 47
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_util.c", "C", 0, 0, 0, 0, 0, 0, 283, 0, 0, 0, 0, 0, 0, 0, 86, 369
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell_main.c", "C", 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 6, 25
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shstat_main.c", "C", 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 11, 56
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shutdown_main.c", "C", 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 11, 51
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\sleep_main.c", "C", 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 14, 66
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\sort_main.c", "C", 0, 0, 0, 0, 0, 0, 205, 0, 0, 0, 0, 0, 0, 0, 63, 268
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\spawn_main.c", "C", 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 20, 96
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\spin_main.c", "C", 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 4, 17
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\stats_main.c", "C", 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 0, 0, 17, 119
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\tail_main.c", "C", 0, 0, 0, 0, 0, 0, 190, 0, 0, 0, 0, 0, 0, 0, 54, 244
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\taskstat_main.c", "C", 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 11, 54
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\top_main.c", "C", 0, 0, 0, 0, 0, 0, 195, 0, 0, 0, 0, 0, 0, 0, 47, 242
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\touch_main.c", "C", 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 16, 74
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\tty_main.c", "C", 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 17, 81
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ttydrv_main.c", "C", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\uniq_main.c", "C", 0, 0, 0, 0, 0, 0, 168, 0, 0, 0, 0, 0, 0, 0, 48, 216
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\userstat_main.c", "C", 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 11, 59
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wait_main.c", "C", 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 17, 85
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wavplay_main.c", "C", 0, 0, 0, 0, 0, 0, 396, 0, 0, 0, 0, 0, 0, 0, 99, 495
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wc_main.c", "C", 0, 0, 0, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 0, 45, 209
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\write_main.c", "C", 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 18, 92
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\yield_main.c", "C", 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_rust_bridge.h", "C++", 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 4, 10
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h", "C++", 0, 0, 0, 0, 0, 0, 0, 168, 0, 0, 0, 0, 0, 0, 9, 177
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\runtime.c", "C", 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 12, 49
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\syscall.c", "C", 0, 0, 0, 0, 0, 0, 223, 0, 0, 0, 0, 0, 0, 0, 74, 297
|
||||
"d:\Projects\C\cleonos\cleonos\c\stub.c", "C", 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 4, 2, 9
|
||||
"d:\Projects\C\cleonos\cleonos\rust\src\lib.rs", "Rust", 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 9, 32
|
||||
"d:\Projects\C\cleonos\clks\arch\aarch64\boot.c", "C", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\boot.c", "C", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\exec_stack_call.S", "Go Assembly", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 8, 48
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\interrupt_stubs.S", "Go Assembly", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 0, 0, 12, 120
|
||||
"d:\Projects\C\cleonos\clks\drivers\audio\pcspeaker.c", "C", 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 0, 25, 126
|
||||
"d:\Projects\C\cleonos\clks\drivers\serial\serial.c", "C", 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 16, 68
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\font8x8.c", "C", 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, 8, 75
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\font8x8.h", "C++", 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 3, 8
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\framebuffer.c", "C", 0, 0, 0, 0, 0, 0, 251, 0, 0, 0, 0, 0, 0, 0, 70, 321
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\psf_font.c", "C", 0, 0, 0, 0, 0, 0, 230, 0, 0, 0, 0, 0, 0, 0, 56, 286
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\psf_font.h", "C++", 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 5, 20
|
||||
"d:\Projects\C\cleonos\clks\include\clks\audio.h", "C++", 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 3, 12
|
||||
"d:\Projects\C\cleonos\clks\include\clks\boot.h", "C++", 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 4, 15
|
||||
"d:\Projects\C\cleonos\clks\include\clks\compiler.h", "C++", 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 4, 17
|
||||
"d:\Projects\C\cleonos\clks\include\clks\cpu.h", "C++", 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 4, 24
|
||||
"d:\Projects\C\cleonos\clks\include\clks\desktop.h", "C++", 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 4, 11
|
||||
"d:\Projects\C\cleonos\clks\include\clks\driver.h", "C++", 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 8, 37
|
||||
"d:\Projects\C\cleonos\clks\include\clks\elf64.h", "C++", 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 9, 41
|
||||
"d:\Projects\C\cleonos\clks\include\clks\elfrunner.h", "C++", 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\clks\include\clks\exec.h", "C++", 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 74
|
||||
"d:\Projects\C\cleonos\clks\include\clks\framebuffer.h", "C++", 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 6, 32
|
||||
"d:\Projects\C\cleonos\clks\include\clks\fs.h", "C++", 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 7, 30
|
||||
"d:\Projects\C\cleonos\clks\include\clks\heap.h", "C++", 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 4, 19
|
||||
"d:\Projects\C\cleonos\clks\include\clks\interrupts.h", "C++", 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\clks\include\clks\kelf.h", "C++", 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 5, 14
|
||||
"d:\Projects\C\cleonos\clks\include\clks\kernel.h", "C++", 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 2, 6
|
||||
"d:\Projects\C\cleonos\clks\include\clks\keyboard.h", "C++", 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 6, 33
|
||||
"d:\Projects\C\cleonos\clks\include\clks\limine.h", "C++", 0, 0, 0, 0, 0, 0, 0, 132, 0, 0, 0, 0, 0, 0, 24, 156
|
||||
"d:\Projects\C\cleonos\clks\include\clks\log.h", "C++", 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 5, 19
|
||||
"d:\Projects\C\cleonos\clks\include\clks\mouse.h", "C++", 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 6, 26
|
||||
"d:\Projects\C\cleonos\clks\include\clks\panic.h", "C++", 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 4, 16
|
||||
"d:\Projects\C\cleonos\clks\include\clks\pmm.h", "C++", 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 5, 21
|
||||
"d:\Projects\C\cleonos\clks\include\clks\ramdisk.h", "C++", 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 8, 25
|
||||
"d:\Projects\C\cleonos\clks\include\clks\scheduler.h", "C++", 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 5, 23
|
||||
"d:\Projects\C\cleonos\clks\include\clks\serial.h", "C++", 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 2, 8
|
||||
"d:\Projects\C\cleonos\clks\include\clks\service.h", "C++", 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 8, 39
|
||||
"d:\Projects\C\cleonos\clks\include\clks\shell.h", "C++", 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 3, 10
|
||||
"d:\Projects\C\cleonos\clks\include\clks\string.h", "C++", 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 3, 12
|
||||
"d:\Projects\C\cleonos\clks\include\clks\syscall.h", "C++", 0, 0, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 5, 80
|
||||
"d:\Projects\C\cleonos\clks\include\clks\task.h", "C++", 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 7, 31
|
||||
"d:\Projects\C\cleonos\clks\include\clks\tty.h", "C++", 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 4, 18
|
||||
"d:\Projects\C\cleonos\clks\include\clks\types.h", "C++", 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 6, 23
|
||||
"d:\Projects\C\cleonos\clks\include\clks\userland.h", "C++", 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 4, 16
|
||||
"d:\Projects\C\cleonos\clks\kernel\desktop.c", "C", 0, 0, 0, 0, 0, 0, 321, 0, 0, 0, 0, 0, 0, 0, 86, 407
|
||||
"d:\Projects\C\cleonos\clks\kernel\driver.c", "C", 0, 0, 0, 0, 0, 0, 169, 0, 0, 0, 0, 0, 0, 0, 49, 218
|
||||
"d:\Projects\C\cleonos\clks\kernel\elf64.c", "C", 0, 0, 0, 0, 0, 0, 239, 0, 0, 0, 0, 0, 0, 0, 73, 312
|
||||
"d:\Projects\C\cleonos\clks\kernel\elfrunner.c", "C", 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 8, 38
|
||||
"d:\Projects\C\cleonos\clks\kernel\exec.c", "C", 0, 0, 0, 0, 0, 0, 1203, 0, 0, 0, 0, 0, 0, 1, 335, 1539
|
||||
"d:\Projects\C\cleonos\clks\kernel\fs.c", "C", 0, 0, 0, 0, 0, 0, 698, 0, 0, 0, 0, 0, 0, 0, 220, 918
|
||||
"d:\Projects\C\cleonos\clks\kernel\heap.c", "C", 0, 0, 0, 0, 0, 0, 134, 0, 0, 0, 0, 0, 0, 0, 42, 176
|
||||
"d:\Projects\C\cleonos\clks\kernel\interrupts.c", "C", 0, 0, 0, 0, 0, 0, 317, 0, 0, 0, 0, 0, 0, 0, 44, 361
|
||||
"d:\Projects\C\cleonos\clks\kernel\kelf.c", "C", 0, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 1, 53, 257
|
||||
"d:\Projects\C\cleonos\clks\kernel\keyboard.c", "C", 0, 0, 0, 0, 0, 0, 351, 0, 0, 0, 0, 0, 0, 0, 88, 439
|
||||
"d:\Projects\C\cleonos\clks\kernel\kmain.c", "C", 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, 0, 0, 0, 1, 52, 253
|
||||
"d:\Projects\C\cleonos\clks\kernel\limine_requests.c", "C", 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 26, 102
|
||||
"d:\Projects\C\cleonos\clks\kernel\log.c", "C", 0, 0, 0, 0, 0, 0, 185, 0, 0, 0, 0, 0, 0, 0, 48, 233
|
||||
"d:\Projects\C\cleonos\clks\kernel\mouse.c", "C", 0, 0, 0, 0, 0, 0, 246, 0, 0, 0, 0, 0, 0, 0, 63, 309
|
||||
"d:\Projects\C\cleonos\clks\kernel\panic.c", "C", 0, 0, 0, 0, 0, 0, 546, 0, 0, 0, 0, 0, 0, 0, 155, 701
|
||||
"d:\Projects\C\cleonos\clks\kernel\pmm.c", "C", 0, 0, 0, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 23, 105
|
||||
"d:\Projects\C\cleonos\clks\kernel\ramdisk.c", "C", 0, 0, 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 0, 50, 222
|
||||
"d:\Projects\C\cleonos\clks\kernel\scheduler.c", "C", 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 0, 0, 44, 180
|
||||
"d:\Projects\C\cleonos\clks\kernel\service.c", "C", 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 34, 147
|
||||
"d:\Projects\C\cleonos\clks\kernel\shell.c", "C", 0, 0, 0, 0, 0, 0, 1249, 0, 0, 0, 0, 0, 0, 0, 317, 1566
|
||||
"d:\Projects\C\cleonos\clks\kernel\syscall.c", "C", 0, 0, 0, 0, 0, 0, 1375, 0, 0, 0, 0, 0, 0, 0, 344, 1719
|
||||
"d:\Projects\C\cleonos\clks\kernel\tty.c", "C", 0, 0, 0, 0, 0, 0, 1115, 0, 0, 0, 0, 0, 0, 0, 275, 1390
|
||||
"d:\Projects\C\cleonos\clks\kernel\userland.c", "C", 0, 0, 0, 0, 0, 0, 124, 0, 0, 0, 0, 0, 0, 0, 35, 159
|
||||
"d:\Projects\C\cleonos\clks\lib\libc_compat.c", "C", 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 7, 32
|
||||
"d:\Projects\C\cleonos\clks\lib\string.c", "C", 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 16, 70
|
||||
"d:\Projects\C\cleonos\clks\rust\src\lib.rs", "Rust", 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 6, 27
|
||||
"d:\Projects\C\cleonos\cmake\check_tools.cmake", "CMake", 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 41
|
||||
"d:\Projects\C\cleonos\cmake\gen_kernel_symbols.cmake", "CMake", 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 106
|
||||
"d:\Projects\C\cleonos\cmake\log.cmake", "CMake", 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 36
|
||||
"d:\Projects\C\cleonos\cmake\log_emit.cmake", "CMake", 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 29
|
||||
"d:\Projects\C\cleonos\cmake\setup_limine.cmake", "CMake", 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 119
|
||||
"d:\Projects\C\cleonos\configs\limine.conf", "Properties", 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\docs\README.md", "Markdown", 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 35
|
||||
"d:\Projects\C\cleonos\docs\stage1.md", "Markdown", 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 46
|
||||
"d:\Projects\C\cleonos\docs\stage10.md", "Markdown", 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage11.md", "Markdown", 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 41
|
||||
"d:\Projects\C\cleonos\docs\stage12.md", "Markdown", 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 46
|
||||
"d:\Projects\C\cleonos\docs\stage13.md", "Markdown", 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage14.md", "Markdown", 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 52
|
||||
"d:\Projects\C\cleonos\docs\stage15.md", "Markdown", 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 54
|
||||
"d:\Projects\C\cleonos\docs\stage2.md", "Markdown", 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 35
|
||||
"d:\Projects\C\cleonos\docs\stage20.md", "Markdown", 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 52
|
||||
"d:\Projects\C\cleonos\docs\stage21.md", "Markdown", 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 79
|
||||
"d:\Projects\C\cleonos\docs\stage22.md", "Markdown", 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 75
|
||||
"d:\Projects\C\cleonos\docs\stage23.md", "Markdown", 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 47
|
||||
"d:\Projects\C\cleonos\docs\stage24.md", "Markdown", 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 49
|
||||
"d:\Projects\C\cleonos\docs\stage25.md", "Markdown", 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 65
|
||||
"d:\Projects\C\cleonos\docs\stage26.md", "Markdown", 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 39
|
||||
"d:\Projects\C\cleonos\docs\stage27.md", "Markdown", 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 39
|
||||
"d:\Projects\C\cleonos\docs\stage28.md", "Markdown", 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 44
|
||||
"d:\Projects\C\cleonos\docs\stage29.md", "Markdown", 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 40
|
||||
"d:\Projects\C\cleonos\docs\stage3.md", "Markdown", 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 34
|
||||
"d:\Projects\C\cleonos\docs\stage4.md", "Markdown", 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 35
|
||||
"d:\Projects\C\cleonos\docs\stage5.md", "Markdown", 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 34
|
||||
"d:\Projects\C\cleonos\docs\stage6.md", "Markdown", 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 36
|
||||
"d:\Projects\C\cleonos\docs\stage7.md", "Markdown", 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage8.md", "Markdown", 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 37
|
||||
"d:\Projects\C\cleonos\docs\stage9.md", "Markdown", 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 37
|
||||
"d:\Projects\C\cleonos\docs\syscall.md", "Markdown", 0, 380, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 548
|
||||
"d:\Projects\C\cleonos\ramdisk\shell\init.cmd", "Batch", 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 2, 6
|
||||
"d:\Projects\C\cleonos\scripts\gen-tty-psf.ps1", "PowerShell", 0, 0, 0, 0, 0, 171, 0, 0, 0, 0, 0, 0, 0, 2, 42, 215
|
||||
"d:\Projects\C\cleonos\wine\README.md", "Markdown", 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 68
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine.py", "Python", 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 7
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\__init__.py", "Python", 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\cli.py", "Python", 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 54
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\constants.py", "Python", 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 11, 88
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\input_pump.py", "Python", 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 99
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\platform.py", "Python", 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 60
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\runner.py", "Python", 990, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 1165
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\state.py", "Python", 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 204
|
||||
"d:\Projects\C\cleonos\wine\requirements.txt", "pip requirements", 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2
|
||||
"Total", "-", 1418, 1625, 1, 881, 6, 171, 19580, 1093, 44, 4, 100, 148, 48, 12, 6368, 31499
|
||||
|
1
.VSCodeCounter/2026-04-17_19-36-06/results.json
Normal file
1
.VSCodeCounter/2026-04-17_19-36-06/results.json
Normal file
File diff suppressed because one or more lines are too long
69
.VSCodeCounter/2026-04-17_19-36-06/results.md
Normal file
69
.VSCodeCounter/2026-04-17_19-36-06/results.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# Summary
|
||||
|
||||
Date : 2026-04-17 19:36:06
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 192 files, 25119 codes, 12 comments, 6368 blanks, all 31499 lines
|
||||
|
||||
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
|
||||
## Languages
|
||||
| language | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| C | 100 | 19,580 | 8 | 5,188 | 24,776 |
|
||||
| Markdown | 30 | 1,625 | 0 | 414 | 2,039 |
|
||||
| Python | 8 | 1,418 | 2 | 262 | 1,682 |
|
||||
| C++ | 38 | 1,093 | 0 | 239 | 1,332 |
|
||||
| CMake | 6 | 881 | 0 | 152 | 1,033 |
|
||||
| PowerShell | 1 | 171 | 2 | 42 | 215 |
|
||||
| Go Assembly | 2 | 148 | 0 | 20 | 168 |
|
||||
| Makefile | 1 | 100 | 0 | 22 | 122 |
|
||||
| YAML | 1 | 48 | 0 | 10 | 58 |
|
||||
| Rust | 2 | 44 | 0 | 15 | 59 |
|
||||
| Properties | 1 | 6 | 0 | 1 | 7 |
|
||||
| Batch | 1 | 4 | 0 | 2 | 6 |
|
||||
| pip requirements | 1 | 1 | 0 | 1 | 2 |
|
||||
|
||||
## Directories
|
||||
| path | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| . | 192 | 25,119 | 12 | 6,368 | 31,499 |
|
||||
| . (Files) | 4 | 898 | 0 | 178 | 1,076 |
|
||||
| .github | 1 | 48 | 0 | 10 | 58 |
|
||||
| .github\\workflows | 1 | 48 | 0 | 10 | 58 |
|
||||
| cleonos | 73 | 9,873 | 5 | 2,585 | 12,463 |
|
||||
| cleonos\\c | 72 | 9,850 | 5 | 2,576 | 12,431 |
|
||||
| cleonos\\c (Files) | 1 | 3 | 4 | 2 | 9 |
|
||||
| cleonos\\c\\apps | 67 | 9,413 | 1 | 2,475 | 11,889 |
|
||||
| cleonos\\c\\apps (Files) | 60 | 5,856 | 1 | 1,546 | 7,403 |
|
||||
| cleonos\\c\\apps\\shell | 7 | 3,557 | 0 | 929 | 4,486 |
|
||||
| cleonos\\c\\include | 2 | 174 | 0 | 13 | 187 |
|
||||
| cleonos\\c\\src | 2 | 260 | 0 | 86 | 346 |
|
||||
| cleonos\\rust | 1 | 23 | 0 | 9 | 32 |
|
||||
| cleonos\\rust\\src | 1 | 23 | 0 | 9 | 32 |
|
||||
| clks | 69 | 10,992 | 3 | 2,877 | 13,872 |
|
||||
| clks\\arch | 4 | 160 | 0 | 22 | 182 |
|
||||
| clks\\arch\\aarch64 | 1 | 6 | 0 | 1 | 7 |
|
||||
| clks\\arch\\x86_64 | 3 | 154 | 0 | 21 | 175 |
|
||||
| clks\\drivers | 7 | 721 | 0 | 183 | 904 |
|
||||
| clks\\drivers\\audio | 1 | 101 | 0 | 25 | 126 |
|
||||
| clks\\drivers\\serial | 1 | 52 | 0 | 16 | 68 |
|
||||
| clks\\drivers\\video | 5 | 568 | 0 | 142 | 710 |
|
||||
| clks\\include | 32 | 727 | 0 | 179 | 906 |
|
||||
| clks\\include\\clks | 32 | 727 | 0 | 179 | 906 |
|
||||
| clks\\kernel | 23 | 9,284 | 3 | 2,464 | 11,751 |
|
||||
| clks\\lib | 2 | 79 | 0 | 23 | 102 |
|
||||
| clks\\rust | 1 | 21 | 0 | 6 | 27 |
|
||||
| clks\\rust\\src | 1 | 21 | 0 | 6 | 27 |
|
||||
| cmake | 5 | 267 | 0 | 64 | 331 |
|
||||
| configs | 1 | 6 | 0 | 1 | 7 |
|
||||
| docs | 27 | 1,392 | 0 | 327 | 1,719 |
|
||||
| ramdisk | 1 | 4 | 0 | 2 | 6 |
|
||||
| ramdisk\\shell | 1 | 4 | 0 | 2 | 6 |
|
||||
| scripts | 1 | 171 | 2 | 42 | 215 |
|
||||
| wine | 10 | 1,468 | 2 | 282 | 1,752 |
|
||||
| wine (Files) | 3 | 53 | 1 | 23 | 77 |
|
||||
| wine\\cleonos_wine_lib | 7 | 1,415 | 1 | 259 | 1,675 |
|
||||
|
||||
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
264
.VSCodeCounter/2026-04-17_19-36-06/results.txt
Normal file
264
.VSCodeCounter/2026-04-17_19-36-06/results.txt
Normal file
@@ -0,0 +1,264 @@
|
||||
Date : 2026-04-17 19:36:06
|
||||
Directory : d:\Projects\C\cleonos
|
||||
Total : 192 files, 25119 codes, 12 comments, 6368 blanks, all 31499 lines
|
||||
|
||||
Languages
|
||||
+------------------+------------+------------+------------+------------+------------+
|
||||
| language | files | code | comment | blank | total |
|
||||
+------------------+------------+------------+------------+------------+------------+
|
||||
| C | 100 | 19,580 | 8 | 5,188 | 24,776 |
|
||||
| Markdown | 30 | 1,625 | 0 | 414 | 2,039 |
|
||||
| Python | 8 | 1,418 | 2 | 262 | 1,682 |
|
||||
| C++ | 38 | 1,093 | 0 | 239 | 1,332 |
|
||||
| CMake | 6 | 881 | 0 | 152 | 1,033 |
|
||||
| PowerShell | 1 | 171 | 2 | 42 | 215 |
|
||||
| Go Assembly | 2 | 148 | 0 | 20 | 168 |
|
||||
| Makefile | 1 | 100 | 0 | 22 | 122 |
|
||||
| YAML | 1 | 48 | 0 | 10 | 58 |
|
||||
| Rust | 2 | 44 | 0 | 15 | 59 |
|
||||
| Properties | 1 | 6 | 0 | 1 | 7 |
|
||||
| Batch | 1 | 4 | 0 | 2 | 6 |
|
||||
| pip requirements | 1 | 1 | 0 | 1 | 2 |
|
||||
+------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Directories
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| path | files | code | comment | blank | total |
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| . | 192 | 25,119 | 12 | 6,368 | 31,499 |
|
||||
| . (Files) | 4 | 898 | 0 | 178 | 1,076 |
|
||||
| .github | 1 | 48 | 0 | 10 | 58 |
|
||||
| .github\workflows | 1 | 48 | 0 | 10 | 58 |
|
||||
| cleonos | 73 | 9,873 | 5 | 2,585 | 12,463 |
|
||||
| cleonos\c | 72 | 9,850 | 5 | 2,576 | 12,431 |
|
||||
| cleonos\c (Files) | 1 | 3 | 4 | 2 | 9 |
|
||||
| cleonos\c\apps | 67 | 9,413 | 1 | 2,475 | 11,889 |
|
||||
| cleonos\c\apps (Files) | 60 | 5,856 | 1 | 1,546 | 7,403 |
|
||||
| cleonos\c\apps\shell | 7 | 3,557 | 0 | 929 | 4,486 |
|
||||
| cleonos\c\include | 2 | 174 | 0 | 13 | 187 |
|
||||
| cleonos\c\src | 2 | 260 | 0 | 86 | 346 |
|
||||
| cleonos\rust | 1 | 23 | 0 | 9 | 32 |
|
||||
| cleonos\rust\src | 1 | 23 | 0 | 9 | 32 |
|
||||
| clks | 69 | 10,992 | 3 | 2,877 | 13,872 |
|
||||
| clks\arch | 4 | 160 | 0 | 22 | 182 |
|
||||
| clks\arch\aarch64 | 1 | 6 | 0 | 1 | 7 |
|
||||
| clks\arch\x86_64 | 3 | 154 | 0 | 21 | 175 |
|
||||
| clks\drivers | 7 | 721 | 0 | 183 | 904 |
|
||||
| clks\drivers\audio | 1 | 101 | 0 | 25 | 126 |
|
||||
| clks\drivers\serial | 1 | 52 | 0 | 16 | 68 |
|
||||
| clks\drivers\video | 5 | 568 | 0 | 142 | 710 |
|
||||
| clks\include | 32 | 727 | 0 | 179 | 906 |
|
||||
| clks\include\clks | 32 | 727 | 0 | 179 | 906 |
|
||||
| clks\kernel | 23 | 9,284 | 3 | 2,464 | 11,751 |
|
||||
| clks\lib | 2 | 79 | 0 | 23 | 102 |
|
||||
| clks\rust | 1 | 21 | 0 | 6 | 27 |
|
||||
| clks\rust\src | 1 | 21 | 0 | 6 | 27 |
|
||||
| cmake | 5 | 267 | 0 | 64 | 331 |
|
||||
| configs | 1 | 6 | 0 | 1 | 7 |
|
||||
| docs | 27 | 1,392 | 0 | 327 | 1,719 |
|
||||
| ramdisk | 1 | 4 | 0 | 2 | 6 |
|
||||
| ramdisk\shell | 1 | 4 | 0 | 2 | 6 |
|
||||
| scripts | 1 | 171 | 2 | 42 | 215 |
|
||||
| wine | 10 | 1,468 | 2 | 282 | 1,752 |
|
||||
| wine (Files) | 3 | 53 | 1 | 23 | 77 |
|
||||
| wine\cleonos_wine_lib | 7 | 1,415 | 1 | 259 | 1,675 |
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Files
|
||||
+---------------------------------------------------------------+------------------+------------+------------+------------+------------+
|
||||
| filename | language | code | comment | blank | total |
|
||||
+---------------------------------------------------------------+------------------+------------+------------+------------+------------+
|
||||
| d:\Projects\C\cleonos\.github\workflows\build-os.yml | YAML | 48 | 0 | 10 | 58 |
|
||||
| d:\Projects\C\cleonos\CMakeLists.txt | CMake | 614 | 0 | 88 | 702 |
|
||||
| d:\Projects\C\cleonos\Makefile | Makefile | 100 | 0 | 22 | 122 |
|
||||
| d:\Projects\C\cleonos\README.md | Markdown | 92 | 0 | 34 | 126 |
|
||||
| d:\Projects\C\cleonos\README.zh-CN.md | Markdown | 92 | 0 | 34 | 126 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ansi_main.c | C | 43 | 0 | 11 | 54 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ansitest_main.c | C | 142 | 0 | 35 | 177 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\append_main.c | C | 74 | 0 | 18 | 92 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\args_main.c | C | 49 | 0 | 13 | 62 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\bg_main.c | C | 101 | 0 | 26 | 127 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cat_main.c | C | 83 | 0 | 24 | 107 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cd_main.c | C | 54 | 0 | 15 | 69 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\clear_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.c | C | 446 | 0 | 143 | 589 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.h | C++ | 80 | 0 | 19 | 99 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cp_main.c | C | 95 | 0 | 26 | 121 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cut_main.c | C | 214 | 1 | 55 | 270 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\dmesg_main.c | C | 64 | 0 | 18 | 82 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_kmain.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_main.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\exec_main.c | C | 87 | 0 | 22 | 109 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\exit_main.c | C | 54 | 0 | 14 | 68 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fastfetch_main.c | C | 180 | 0 | 34 | 214 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fg_main.c | C | 150 | 0 | 36 | 186 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fsstat_main.c | C | 45 | 0 | 11 | 56 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\grep_main.c | C | 195 | 0 | 54 | 249 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\head_main.c | C | 164 | 0 | 47 | 211 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\hello_main.c | C | 6 | 0 | 2 | 8 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\help_main.c | C | 79 | 0 | 10 | 89 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\jobs_main.c | C | 120 | 0 | 26 | 146 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\kbdstat_main.c | C | 44 | 0 | 11 | 55 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\kdbg_main.c | C | 214 | 0 | 56 | 270 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\kill_main.c | C | 144 | 0 | 39 | 183 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ls_main.c | C | 262 | 0 | 76 | 338 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memc_kmain.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memc_main.c | C | 8 | 0 | 3 | 11 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memstat_main.c | C | 43 | 0 | 11 | 54 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\mkdir_main.c | C | 57 | 0 | 16 | 73 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\mv_main.c | C | 102 | 0 | 28 | 130 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\pid_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ps_main.c | C | 160 | 0 | 35 | 195 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\pwd_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\restart_main.c | C | 40 | 0 | 11 | 51 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\rm_main.c | C | 57 | 0 | 16 | 73 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c | C | 2,314 | 0 | 574 | 2,888 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_external.c | C | 166 | 0 | 55 | 221 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c | C | 514 | 0 | 132 | 646 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_internal.h | C++ | 92 | 0 | 20 | 112 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_path.c | C | 153 | 0 | 50 | 203 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_script.c | C | 35 | 0 | 12 | 47 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_util.c | C | 283 | 0 | 86 | 369 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell_main.c | C | 19 | 0 | 6 | 25 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shstat_main.c | C | 45 | 0 | 11 | 56 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shutdown_main.c | C | 40 | 0 | 11 | 51 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\sleep_main.c | C | 52 | 0 | 14 | 66 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\sort_main.c | C | 205 | 0 | 63 | 268 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\spawn_main.c | C | 76 | 0 | 20 | 96 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\spin_main.c | C | 13 | 0 | 4 | 17 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\stats_main.c | C | 102 | 0 | 17 | 119 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\tail_main.c | C | 190 | 0 | 54 | 244 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\taskstat_main.c | C | 43 | 0 | 11 | 54 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\top_main.c | C | 195 | 0 | 47 | 242 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\touch_main.c | C | 58 | 0 | 16 | 74 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\tty_main.c | C | 64 | 0 | 17 | 81 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ttydrv_main.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\uniq_main.c | C | 168 | 0 | 48 | 216 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\userstat_main.c | C | 48 | 0 | 11 | 59 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wait_main.c | C | 68 | 0 | 17 | 85 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wavplay_main.c | C | 396 | 0 | 99 | 495 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wc_main.c | C | 164 | 0 | 45 | 209 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\write_main.c | C | 74 | 0 | 18 | 92 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\yield_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_rust_bridge.h | C++ | 6 | 0 | 4 | 10 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h | C++ | 168 | 0 | 9 | 177 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\runtime.c | C | 37 | 0 | 12 | 49 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\syscall.c | C | 223 | 0 | 74 | 297 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\stub.c | C | 3 | 4 | 2 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\rust\src\lib.rs | Rust | 23 | 0 | 9 | 32 |
|
||||
| d:\Projects\C\cleonos\clks\arch\aarch64\boot.c | C | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\boot.c | C | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\exec_stack_call.S | Go Assembly | 40 | 0 | 8 | 48 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\interrupt_stubs.S | Go Assembly | 108 | 0 | 12 | 120 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\audio\pcspeaker.c | C | 101 | 0 | 25 | 126 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\serial\serial.c | C | 52 | 0 | 16 | 68 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\font8x8.c | C | 67 | 0 | 8 | 75 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\font8x8.h | C++ | 5 | 0 | 3 | 8 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\framebuffer.c | C | 251 | 0 | 70 | 321 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\psf_font.c | C | 230 | 0 | 56 | 286 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\psf_font.h | C++ | 15 | 0 | 5 | 20 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\audio.h | C++ | 9 | 0 | 3 | 12 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\boot.h | C++ | 11 | 0 | 4 | 15 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\compiler.h | C++ | 13 | 0 | 4 | 17 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\cpu.h | C++ | 20 | 0 | 4 | 24 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\desktop.h | C++ | 7 | 0 | 4 | 11 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\driver.h | C++ | 29 | 0 | 8 | 37 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\elf64.h | C++ | 32 | 0 | 9 | 41 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\elfrunner.h | C++ | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\exec.h | C++ | 66 | 0 | 8 | 74 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\framebuffer.h | C++ | 26 | 0 | 6 | 32 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\fs.h | C++ | 23 | 0 | 7 | 30 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\heap.h | C++ | 15 | 0 | 4 | 19 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\interrupts.h | C++ | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\kelf.h | C++ | 9 | 0 | 5 | 14 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\kernel.h | C++ | 4 | 0 | 2 | 6 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\keyboard.h | C++ | 27 | 0 | 6 | 33 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\limine.h | C++ | 132 | 0 | 24 | 156 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\log.h | C++ | 14 | 0 | 5 | 19 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\mouse.h | C++ | 20 | 0 | 6 | 26 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\panic.h | C++ | 12 | 0 | 4 | 16 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\pmm.h | C++ | 16 | 0 | 5 | 21 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\ramdisk.h | C++ | 17 | 0 | 8 | 25 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\scheduler.h | C++ | 18 | 0 | 5 | 23 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\serial.h | C++ | 6 | 0 | 2 | 8 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\service.h | C++ | 31 | 0 | 8 | 39 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\shell.h | C++ | 7 | 0 | 3 | 10 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\string.h | C++ | 9 | 0 | 3 | 12 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\syscall.h | C++ | 75 | 0 | 5 | 80 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\task.h | C++ | 24 | 0 | 7 | 31 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\tty.h | C++ | 14 | 0 | 4 | 18 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\types.h | C++ | 17 | 0 | 6 | 23 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\userland.h | C++ | 12 | 0 | 4 | 16 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\desktop.c | C | 321 | 0 | 86 | 407 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\driver.c | C | 169 | 0 | 49 | 218 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\elf64.c | C | 239 | 0 | 73 | 312 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\elfrunner.c | C | 30 | 0 | 8 | 38 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\exec.c | C | 1,203 | 1 | 335 | 1,539 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\fs.c | C | 698 | 0 | 220 | 918 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\heap.c | C | 134 | 0 | 42 | 176 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\interrupts.c | C | 317 | 0 | 44 | 361 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\kelf.c | C | 203 | 1 | 53 | 257 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\keyboard.c | C | 351 | 0 | 88 | 439 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\kmain.c | C | 200 | 1 | 52 | 253 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\limine_requests.c | C | 76 | 0 | 26 | 102 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\log.c | C | 185 | 0 | 48 | 233 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\mouse.c | C | 246 | 0 | 63 | 309 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\panic.c | C | 546 | 0 | 155 | 701 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\pmm.c | C | 82 | 0 | 23 | 105 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\ramdisk.c | C | 172 | 0 | 50 | 222 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\scheduler.c | C | 136 | 0 | 44 | 180 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\service.c | C | 113 | 0 | 34 | 147 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\shell.c | C | 1,249 | 0 | 317 | 1,566 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\syscall.c | C | 1,375 | 0 | 344 | 1,719 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\tty.c | C | 1,115 | 0 | 275 | 1,390 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\userland.c | C | 124 | 0 | 35 | 159 |
|
||||
| d:\Projects\C\cleonos\clks\lib\libc_compat.c | C | 25 | 0 | 7 | 32 |
|
||||
| d:\Projects\C\cleonos\clks\lib\string.c | C | 54 | 0 | 16 | 70 |
|
||||
| d:\Projects\C\cleonos\clks\rust\src\lib.rs | Rust | 21 | 0 | 6 | 27 |
|
||||
| d:\Projects\C\cleonos\cmake\check_tools.cmake | CMake | 34 | 0 | 7 | 41 |
|
||||
| d:\Projects\C\cleonos\cmake\gen_kernel_symbols.cmake | CMake | 80 | 0 | 26 | 106 |
|
||||
| d:\Projects\C\cleonos\cmake\log.cmake | CMake | 30 | 0 | 6 | 36 |
|
||||
| d:\Projects\C\cleonos\cmake\log_emit.cmake | CMake | 23 | 0 | 6 | 29 |
|
||||
| d:\Projects\C\cleonos\cmake\setup_limine.cmake | CMake | 100 | 0 | 19 | 119 |
|
||||
| d:\Projects\C\cleonos\configs\limine.conf | Properties | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\docs\README.md | Markdown | 31 | 0 | 4 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage1.md | Markdown | 41 | 0 | 5 | 46 |
|
||||
| d:\Projects\C\cleonos\docs\stage10.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage11.md | Markdown | 36 | 0 | 5 | 41 |
|
||||
| d:\Projects\C\cleonos\docs\stage12.md | Markdown | 40 | 0 | 6 | 46 |
|
||||
| d:\Projects\C\cleonos\docs\stage13.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage14.md | Markdown | 44 | 0 | 8 | 52 |
|
||||
| d:\Projects\C\cleonos\docs\stage15.md | Markdown | 47 | 0 | 7 | 54 |
|
||||
| d:\Projects\C\cleonos\docs\stage2.md | Markdown | 30 | 0 | 5 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage20.md | Markdown | 46 | 0 | 6 | 52 |
|
||||
| d:\Projects\C\cleonos\docs\stage21.md | Markdown | 72 | 0 | 7 | 79 |
|
||||
| d:\Projects\C\cleonos\docs\stage22.md | Markdown | 68 | 0 | 7 | 75 |
|
||||
| d:\Projects\C\cleonos\docs\stage23.md | Markdown | 41 | 0 | 6 | 47 |
|
||||
| d:\Projects\C\cleonos\docs\stage24.md | Markdown | 42 | 0 | 7 | 49 |
|
||||
| d:\Projects\C\cleonos\docs\stage25.md | Markdown | 58 | 0 | 7 | 65 |
|
||||
| d:\Projects\C\cleonos\docs\stage26.md | Markdown | 32 | 0 | 7 | 39 |
|
||||
| d:\Projects\C\cleonos\docs\stage27.md | Markdown | 32 | 0 | 7 | 39 |
|
||||
| d:\Projects\C\cleonos\docs\stage28.md | Markdown | 37 | 0 | 7 | 44 |
|
||||
| d:\Projects\C\cleonos\docs\stage29.md | Markdown | 33 | 0 | 7 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage3.md | Markdown | 29 | 0 | 5 | 34 |
|
||||
| d:\Projects\C\cleonos\docs\stage4.md | Markdown | 30 | 0 | 5 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage5.md | Markdown | 29 | 0 | 5 | 34 |
|
||||
| d:\Projects\C\cleonos\docs\stage6.md | Markdown | 30 | 0 | 6 | 36 |
|
||||
| d:\Projects\C\cleonos\docs\stage7.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage8.md | Markdown | 31 | 0 | 6 | 37 |
|
||||
| d:\Projects\C\cleonos\docs\stage9.md | Markdown | 31 | 0 | 6 | 37 |
|
||||
| d:\Projects\C\cleonos\docs\syscall.md | Markdown | 380 | 0 | 168 | 548 |
|
||||
| d:\Projects\C\cleonos\ramdisk\shell\init.cmd | Batch | 4 | 0 | 2 | 6 |
|
||||
| d:\Projects\C\cleonos\scripts\gen-tty-psf.ps1 | PowerShell | 171 | 2 | 42 | 215 |
|
||||
| d:\Projects\C\cleonos\wine\README.md | Markdown | 49 | 0 | 19 | 68 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine.py | Python | 3 | 1 | 3 | 7 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\__init__.py | Python | 4 | 0 | 1 | 5 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\cli.py | Python | 44 | 0 | 10 | 54 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\constants.py | Python | 76 | 1 | 11 | 88 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\input_pump.py | Python | 82 | 0 | 17 | 99 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\platform.py | Python | 55 | 0 | 5 | 60 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\runner.py | Python | 990 | 0 | 175 | 1,165 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\state.py | Python | 164 | 0 | 40 | 204 |
|
||||
| d:\Projects\C\cleonos\wine\requirements.txt | pip requirements | 1 | 0 | 1 | 2 |
|
||||
| Total | | 25,119 | 12 | 6,368 | 31,499 |
|
||||
+---------------------------------------------------------------+------------------+------------+------------+------------+------------+
|
||||
209
.VSCodeCounter/2026-04-17_22-23-18/details.md
Normal file
209
.VSCodeCounter/2026-04-17_22-23-18/details.md
Normal file
@@ -0,0 +1,209 @@
|
||||
# Details
|
||||
|
||||
Date : 2026-04-17 22:23:18
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 194 files, 26202 codes, 12 comments, 6631 blanks, all 32845 lines
|
||||
|
||||
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
|
||||
## Files
|
||||
| filename | language | code | comment | blank | total |
|
||||
| :--- | :--- | ---: | ---: | ---: | ---: |
|
||||
| [.github/workflows/build-os.yml](/.github/workflows/build-os.yml) | YAML | 48 | 0 | 10 | 58 |
|
||||
| [CMakeLists.txt](/CMakeLists.txt) | CMake | 615 | 0 | 88 | 703 |
|
||||
| [Makefile](/Makefile) | Makefile | 100 | 0 | 22 | 122 |
|
||||
| [README.md](/README.md) | Markdown | 92 | 0 | 34 | 126 |
|
||||
| [README.zh-CN.md](/README.zh-CN.md) | Markdown | 92 | 0 | 34 | 126 |
|
||||
| [cleonos/c/apps/ansi\_main.c](/cleonos/c/apps/ansi_main.c) | C | 43 | 0 | 11 | 54 |
|
||||
| [cleonos/c/apps/ansitest\_main.c](/cleonos/c/apps/ansitest_main.c) | C | 142 | 0 | 35 | 177 |
|
||||
| [cleonos/c/apps/append\_main.c](/cleonos/c/apps/append_main.c) | C | 74 | 0 | 18 | 92 |
|
||||
| [cleonos/c/apps/args\_main.c](/cleonos/c/apps/args_main.c) | C | 49 | 0 | 13 | 62 |
|
||||
| [cleonos/c/apps/bg\_main.c](/cleonos/c/apps/bg_main.c) | C | 101 | 0 | 26 | 127 |
|
||||
| [cleonos/c/apps/cat\_main.c](/cleonos/c/apps/cat_main.c) | C | 83 | 0 | 24 | 107 |
|
||||
| [cleonos/c/apps/cd\_main.c](/cleonos/c/apps/cd_main.c) | C | 54 | 0 | 15 | 69 |
|
||||
| [cleonos/c/apps/clear\_main.c](/cleonos/c/apps/clear_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/apps/cmd\_runtime.c](/cleonos/c/apps/cmd_runtime.c) | C | 446 | 0 | 143 | 589 |
|
||||
| [cleonos/c/apps/cmd\_runtime.h](/cleonos/c/apps/cmd_runtime.h) | C++ | 80 | 0 | 19 | 99 |
|
||||
| [cleonos/c/apps/cp\_main.c](/cleonos/c/apps/cp_main.c) | C | 95 | 0 | 26 | 121 |
|
||||
| [cleonos/c/apps/cut\_main.c](/cleonos/c/apps/cut_main.c) | C | 214 | 1 | 55 | 270 |
|
||||
| [cleonos/c/apps/dmesg\_main.c](/cleonos/c/apps/dmesg_main.c) | C | 64 | 0 | 18 | 82 |
|
||||
| [cleonos/c/apps/elfrunner\_kmain.c](/cleonos/c/apps/elfrunner_kmain.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/elfrunner\_main.c](/cleonos/c/apps/elfrunner_main.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/exec\_main.c](/cleonos/c/apps/exec_main.c) | C | 87 | 0 | 22 | 109 |
|
||||
| [cleonos/c/apps/exit\_main.c](/cleonos/c/apps/exit_main.c) | C | 54 | 0 | 14 | 68 |
|
||||
| [cleonos/c/apps/fastfetch\_main.c](/cleonos/c/apps/fastfetch_main.c) | C | 180 | 0 | 34 | 214 |
|
||||
| [cleonos/c/apps/fg\_main.c](/cleonos/c/apps/fg_main.c) | C | 150 | 0 | 36 | 186 |
|
||||
| [cleonos/c/apps/fsstat\_main.c](/cleonos/c/apps/fsstat_main.c) | C | 45 | 0 | 11 | 56 |
|
||||
| [cleonos/c/apps/grep\_main.c](/cleonos/c/apps/grep_main.c) | C | 195 | 0 | 54 | 249 |
|
||||
| [cleonos/c/apps/head\_main.c](/cleonos/c/apps/head_main.c) | C | 164 | 0 | 47 | 211 |
|
||||
| [cleonos/c/apps/hello\_main.c](/cleonos/c/apps/hello_main.c) | C | 6 | 0 | 2 | 8 |
|
||||
| [cleonos/c/apps/help\_main.c](/cleonos/c/apps/help_main.c) | C | 80 | 0 | 10 | 90 |
|
||||
| [cleonos/c/apps/jobs\_main.c](/cleonos/c/apps/jobs_main.c) | C | 120 | 0 | 26 | 146 |
|
||||
| [cleonos/c/apps/kbdstat\_main.c](/cleonos/c/apps/kbdstat_main.c) | C | 44 | 0 | 11 | 55 |
|
||||
| [cleonos/c/apps/kdbg\_main.c](/cleonos/c/apps/kdbg_main.c) | C | 214 | 0 | 56 | 270 |
|
||||
| [cleonos/c/apps/kill\_main.c](/cleonos/c/apps/kill_main.c) | C | 144 | 0 | 39 | 183 |
|
||||
| [cleonos/c/apps/ls\_main.c](/cleonos/c/apps/ls_main.c) | C | 262 | 0 | 76 | 338 |
|
||||
| [cleonos/c/apps/memc\_kmain.c](/cleonos/c/apps/memc_kmain.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/memc\_main.c](/cleonos/c/apps/memc_main.c) | C | 8 | 0 | 3 | 11 |
|
||||
| [cleonos/c/apps/memstat\_main.c](/cleonos/c/apps/memstat_main.c) | C | 43 | 0 | 11 | 54 |
|
||||
| [cleonos/c/apps/mkdir\_main.c](/cleonos/c/apps/mkdir_main.c) | C | 57 | 0 | 16 | 73 |
|
||||
| [cleonos/c/apps/mv\_main.c](/cleonos/c/apps/mv_main.c) | C | 102 | 0 | 28 | 130 |
|
||||
| [cleonos/c/apps/pid\_main.c](/cleonos/c/apps/pid_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/apps/procstat\_main.c](/cleonos/c/apps/procstat_main.c) | C | 202 | 0 | 43 | 245 |
|
||||
| [cleonos/c/apps/ps\_main.c](/cleonos/c/apps/ps_main.c) | C | 160 | 0 | 35 | 195 |
|
||||
| [cleonos/c/apps/pwd\_main.c](/cleonos/c/apps/pwd_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/apps/restart\_main.c](/cleonos/c/apps/restart_main.c) | C | 40 | 0 | 11 | 51 |
|
||||
| [cleonos/c/apps/rm\_main.c](/cleonos/c/apps/rm_main.c) | C | 57 | 0 | 16 | 73 |
|
||||
| [cleonos/c/apps/shell/shell\_cmd.c](/cleonos/c/apps/shell/shell_cmd.c) | C | 2,315 | 0 | 574 | 2,889 |
|
||||
| [cleonos/c/apps/shell/shell\_external.c](/cleonos/c/apps/shell/shell_external.c) | C | 166 | 0 | 55 | 221 |
|
||||
| [cleonos/c/apps/shell/shell\_input.c](/cleonos/c/apps/shell/shell_input.c) | C | 563 | 0 | 147 | 710 |
|
||||
| [cleonos/c/apps/shell/shell\_internal.h](/cleonos/c/apps/shell/shell_internal.h) | C++ | 92 | 0 | 20 | 112 |
|
||||
| [cleonos/c/apps/shell/shell\_path.c](/cleonos/c/apps/shell/shell_path.c) | C | 153 | 0 | 50 | 203 |
|
||||
| [cleonos/c/apps/shell/shell\_script.c](/cleonos/c/apps/shell/shell_script.c) | C | 35 | 0 | 12 | 47 |
|
||||
| [cleonos/c/apps/shell/shell\_util.c](/cleonos/c/apps/shell/shell_util.c) | C | 283 | 0 | 86 | 369 |
|
||||
| [cleonos/c/apps/shell\_main.c](/cleonos/c/apps/shell_main.c) | C | 19 | 0 | 6 | 25 |
|
||||
| [cleonos/c/apps/shstat\_main.c](/cleonos/c/apps/shstat_main.c) | C | 45 | 0 | 11 | 56 |
|
||||
| [cleonos/c/apps/shutdown\_main.c](/cleonos/c/apps/shutdown_main.c) | C | 40 | 0 | 11 | 51 |
|
||||
| [cleonos/c/apps/sleep\_main.c](/cleonos/c/apps/sleep_main.c) | C | 52 | 0 | 14 | 66 |
|
||||
| [cleonos/c/apps/sort\_main.c](/cleonos/c/apps/sort_main.c) | C | 205 | 0 | 63 | 268 |
|
||||
| [cleonos/c/apps/spawn\_main.c](/cleonos/c/apps/spawn_main.c) | C | 76 | 0 | 20 | 96 |
|
||||
| [cleonos/c/apps/spin\_main.c](/cleonos/c/apps/spin_main.c) | C | 13 | 0 | 4 | 17 |
|
||||
| [cleonos/c/apps/stats\_main.c](/cleonos/c/apps/stats_main.c) | C | 102 | 0 | 17 | 119 |
|
||||
| [cleonos/c/apps/sysstat\_main.c](/cleonos/c/apps/sysstat_main.c) | C | 267 | 0 | 45 | 312 |
|
||||
| [cleonos/c/apps/tail\_main.c](/cleonos/c/apps/tail_main.c) | C | 190 | 0 | 54 | 244 |
|
||||
| [cleonos/c/apps/taskstat\_main.c](/cleonos/c/apps/taskstat_main.c) | C | 43 | 0 | 11 | 54 |
|
||||
| [cleonos/c/apps/top\_main.c](/cleonos/c/apps/top_main.c) | C | 195 | 0 | 47 | 242 |
|
||||
| [cleonos/c/apps/touch\_main.c](/cleonos/c/apps/touch_main.c) | C | 58 | 0 | 16 | 74 |
|
||||
| [cleonos/c/apps/tty\_main.c](/cleonos/c/apps/tty_main.c) | C | 64 | 0 | 17 | 81 |
|
||||
| [cleonos/c/apps/ttydrv\_main.c](/cleonos/c/apps/ttydrv_main.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/uniq\_main.c](/cleonos/c/apps/uniq_main.c) | C | 168 | 0 | 48 | 216 |
|
||||
| [cleonos/c/apps/userstat\_main.c](/cleonos/c/apps/userstat_main.c) | C | 48 | 0 | 11 | 59 |
|
||||
| [cleonos/c/apps/wait\_main.c](/cleonos/c/apps/wait_main.c) | C | 68 | 0 | 17 | 85 |
|
||||
| [cleonos/c/apps/wavplay\_main.c](/cleonos/c/apps/wavplay_main.c) | C | 396 | 0 | 99 | 495 |
|
||||
| [cleonos/c/apps/wc\_main.c](/cleonos/c/apps/wc_main.c) | C | 164 | 0 | 45 | 209 |
|
||||
| [cleonos/c/apps/write\_main.c](/cleonos/c/apps/write_main.c) | C | 74 | 0 | 18 | 92 |
|
||||
| [cleonos/c/apps/yield\_main.c](/cleonos/c/apps/yield_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/include/cleonos\_rust\_bridge.h](/cleonos/c/include/cleonos_rust_bridge.h) | C++ | 6 | 0 | 4 | 10 |
|
||||
| [cleonos/c/include/cleonos\_syscall.h](/cleonos/c/include/cleonos_syscall.h) | C++ | 192 | 0 | 10 | 202 |
|
||||
| [cleonos/c/src/runtime.c](/cleonos/c/src/runtime.c) | C | 37 | 0 | 12 | 49 |
|
||||
| [cleonos/c/src/syscall.c](/cleonos/c/src/syscall.c) | C | 250 | 0 | 83 | 333 |
|
||||
| [cleonos/c/stub.c](/cleonos/c/stub.c) | C | 3 | 4 | 2 | 9 |
|
||||
| [cleonos/rust/src/lib.rs](/cleonos/rust/src/lib.rs) | Rust | 23 | 0 | 9 | 32 |
|
||||
| [clks/arch/aarch64/boot.c](/clks/arch/aarch64/boot.c) | C | 6 | 0 | 1 | 7 |
|
||||
| [clks/arch/x86\_64/boot.c](/clks/arch/x86_64/boot.c) | C | 6 | 0 | 1 | 7 |
|
||||
| [clks/arch/x86\_64/exec\_stack\_call.S](/clks/arch/x86_64/exec_stack_call.S) | Go Assembly | 40 | 0 | 8 | 48 |
|
||||
| [clks/arch/x86\_64/interrupt\_stubs.S](/clks/arch/x86_64/interrupt_stubs.S) | Go Assembly | 108 | 0 | 12 | 120 |
|
||||
| [clks/drivers/audio/pcspeaker.c](/clks/drivers/audio/pcspeaker.c) | C | 101 | 0 | 25 | 126 |
|
||||
| [clks/drivers/serial/serial.c](/clks/drivers/serial/serial.c) | C | 52 | 0 | 16 | 68 |
|
||||
| [clks/drivers/video/font8x8.c](/clks/drivers/video/font8x8.c) | C | 67 | 0 | 8 | 75 |
|
||||
| [clks/drivers/video/font8x8.h](/clks/drivers/video/font8x8.h) | C++ | 5 | 0 | 3 | 8 |
|
||||
| [clks/drivers/video/framebuffer.c](/clks/drivers/video/framebuffer.c) | C | 251 | 0 | 70 | 321 |
|
||||
| [clks/drivers/video/psf\_font.c](/clks/drivers/video/psf_font.c) | C | 230 | 0 | 56 | 286 |
|
||||
| [clks/drivers/video/psf\_font.h](/clks/drivers/video/psf_font.h) | C++ | 15 | 0 | 5 | 20 |
|
||||
| [clks/include/clks/audio.h](/clks/include/clks/audio.h) | C++ | 9 | 0 | 3 | 12 |
|
||||
| [clks/include/clks/boot.h](/clks/include/clks/boot.h) | C++ | 11 | 0 | 4 | 15 |
|
||||
| [clks/include/clks/compiler.h](/clks/include/clks/compiler.h) | C++ | 13 | 0 | 4 | 17 |
|
||||
| [clks/include/clks/cpu.h](/clks/include/clks/cpu.h) | C++ | 20 | 0 | 4 | 24 |
|
||||
| [clks/include/clks/desktop.h](/clks/include/clks/desktop.h) | C++ | 7 | 0 | 4 | 11 |
|
||||
| [clks/include/clks/driver.h](/clks/include/clks/driver.h) | C++ | 29 | 0 | 8 | 37 |
|
||||
| [clks/include/clks/elf64.h](/clks/include/clks/elf64.h) | C++ | 32 | 0 | 9 | 41 |
|
||||
| [clks/include/clks/elfrunner.h](/clks/include/clks/elfrunner.h) | C++ | 6 | 0 | 3 | 9 |
|
||||
| [clks/include/clks/exec.h](/clks/include/clks/exec.h) | C++ | 71 | 0 | 8 | 79 |
|
||||
| [clks/include/clks/framebuffer.h](/clks/include/clks/framebuffer.h) | C++ | 26 | 0 | 6 | 32 |
|
||||
| [clks/include/clks/fs.h](/clks/include/clks/fs.h) | C++ | 23 | 0 | 7 | 30 |
|
||||
| [clks/include/clks/heap.h](/clks/include/clks/heap.h) | C++ | 15 | 0 | 4 | 19 |
|
||||
| [clks/include/clks/interrupts.h](/clks/include/clks/interrupts.h) | C++ | 6 | 0 | 3 | 9 |
|
||||
| [clks/include/clks/kelf.h](/clks/include/clks/kelf.h) | C++ | 9 | 0 | 5 | 14 |
|
||||
| [clks/include/clks/kernel.h](/clks/include/clks/kernel.h) | C++ | 4 | 0 | 2 | 6 |
|
||||
| [clks/include/clks/keyboard.h](/clks/include/clks/keyboard.h) | C++ | 27 | 0 | 6 | 33 |
|
||||
| [clks/include/clks/limine.h](/clks/include/clks/limine.h) | C++ | 132 | 0 | 24 | 156 |
|
||||
| [clks/include/clks/log.h](/clks/include/clks/log.h) | C++ | 14 | 0 | 5 | 19 |
|
||||
| [clks/include/clks/mouse.h](/clks/include/clks/mouse.h) | C++ | 20 | 0 | 6 | 26 |
|
||||
| [clks/include/clks/panic.h](/clks/include/clks/panic.h) | C++ | 12 | 0 | 4 | 16 |
|
||||
| [clks/include/clks/pmm.h](/clks/include/clks/pmm.h) | C++ | 16 | 0 | 5 | 21 |
|
||||
| [clks/include/clks/ramdisk.h](/clks/include/clks/ramdisk.h) | C++ | 17 | 0 | 8 | 25 |
|
||||
| [clks/include/clks/scheduler.h](/clks/include/clks/scheduler.h) | C++ | 18 | 0 | 5 | 23 |
|
||||
| [clks/include/clks/serial.h](/clks/include/clks/serial.h) | C++ | 6 | 0 | 2 | 8 |
|
||||
| [clks/include/clks/service.h](/clks/include/clks/service.h) | C++ | 31 | 0 | 8 | 39 |
|
||||
| [clks/include/clks/shell.h](/clks/include/clks/shell.h) | C++ | 7 | 0 | 3 | 10 |
|
||||
| [clks/include/clks/string.h](/clks/include/clks/string.h) | C++ | 9 | 0 | 3 | 12 |
|
||||
| [clks/include/clks/syscall.h](/clks/include/clks/syscall.h) | C++ | 84 | 0 | 5 | 89 |
|
||||
| [clks/include/clks/task.h](/clks/include/clks/task.h) | C++ | 24 | 0 | 7 | 31 |
|
||||
| [clks/include/clks/tty.h](/clks/include/clks/tty.h) | C++ | 14 | 0 | 4 | 18 |
|
||||
| [clks/include/clks/types.h](/clks/include/clks/types.h) | C++ | 17 | 0 | 6 | 23 |
|
||||
| [clks/include/clks/userland.h](/clks/include/clks/userland.h) | C++ | 12 | 0 | 4 | 16 |
|
||||
| [clks/kernel/desktop.c](/clks/kernel/desktop.c) | C | 321 | 0 | 86 | 407 |
|
||||
| [clks/kernel/driver.c](/clks/kernel/driver.c) | C | 169 | 0 | 49 | 218 |
|
||||
| [clks/kernel/elf64.c](/clks/kernel/elf64.c) | C | 239 | 0 | 73 | 312 |
|
||||
| [clks/kernel/elfrunner.c](/clks/kernel/elfrunner.c) | C | 30 | 0 | 8 | 38 |
|
||||
| [clks/kernel/exec.c](/clks/kernel/exec.c) | C | 1,522 | 1 | 435 | 1,958 |
|
||||
| [clks/kernel/fs.c](/clks/kernel/fs.c) | C | 698 | 0 | 220 | 918 |
|
||||
| [clks/kernel/heap.c](/clks/kernel/heap.c) | C | 134 | 0 | 42 | 176 |
|
||||
| [clks/kernel/interrupts.c](/clks/kernel/interrupts.c) | C | 317 | 0 | 44 | 361 |
|
||||
| [clks/kernel/kelf.c](/clks/kernel/kelf.c) | C | 203 | 1 | 53 | 257 |
|
||||
| [clks/kernel/keyboard.c](/clks/kernel/keyboard.c) | C | 351 | 0 | 88 | 439 |
|
||||
| [clks/kernel/kmain.c](/clks/kernel/kmain.c) | C | 200 | 1 | 52 | 253 |
|
||||
| [clks/kernel/limine\_requests.c](/clks/kernel/limine_requests.c) | C | 76 | 0 | 26 | 102 |
|
||||
| [clks/kernel/log.c](/clks/kernel/log.c) | C | 185 | 0 | 48 | 233 |
|
||||
| [clks/kernel/mouse.c](/clks/kernel/mouse.c) | C | 246 | 0 | 63 | 309 |
|
||||
| [clks/kernel/panic.c](/clks/kernel/panic.c) | C | 546 | 0 | 155 | 701 |
|
||||
| [clks/kernel/pmm.c](/clks/kernel/pmm.c) | C | 82 | 0 | 23 | 105 |
|
||||
| [clks/kernel/ramdisk.c](/clks/kernel/ramdisk.c) | C | 172 | 0 | 50 | 222 |
|
||||
| [clks/kernel/scheduler.c](/clks/kernel/scheduler.c) | C | 136 | 0 | 44 | 180 |
|
||||
| [clks/kernel/service.c](/clks/kernel/service.c) | C | 113 | 0 | 34 | 147 |
|
||||
| [clks/kernel/shell.c](/clks/kernel/shell.c) | C | 1,249 | 0 | 317 | 1,566 |
|
||||
| [clks/kernel/syscall.c](/clks/kernel/syscall.c) | C | 1,480 | 0 | 370 | 1,850 |
|
||||
| [clks/kernel/tty.c](/clks/kernel/tty.c) | C | 1,115 | 0 | 275 | 1,390 |
|
||||
| [clks/kernel/userland.c](/clks/kernel/userland.c) | C | 124 | 0 | 35 | 159 |
|
||||
| [clks/lib/libc\_compat.c](/clks/lib/libc_compat.c) | C | 25 | 0 | 7 | 32 |
|
||||
| [clks/lib/string.c](/clks/lib/string.c) | C | 54 | 0 | 16 | 70 |
|
||||
| [clks/rust/src/lib.rs](/clks/rust/src/lib.rs) | Rust | 21 | 0 | 6 | 27 |
|
||||
| [cmake/check\_tools.cmake](/cmake/check_tools.cmake) | CMake | 34 | 0 | 7 | 41 |
|
||||
| [cmake/gen\_kernel\_symbols.cmake](/cmake/gen_kernel_symbols.cmake) | CMake | 80 | 0 | 26 | 106 |
|
||||
| [cmake/log.cmake](/cmake/log.cmake) | CMake | 30 | 0 | 6 | 36 |
|
||||
| [cmake/log\_emit.cmake](/cmake/log_emit.cmake) | CMake | 23 | 0 | 6 | 29 |
|
||||
| [cmake/setup\_limine.cmake](/cmake/setup_limine.cmake) | CMake | 100 | 0 | 19 | 119 |
|
||||
| [configs/limine.conf](/configs/limine.conf) | Properties | 6 | 0 | 1 | 7 |
|
||||
| [docs/README.md](/docs/README.md) | Markdown | 31 | 0 | 4 | 35 |
|
||||
| [docs/stage1.md](/docs/stage1.md) | Markdown | 41 | 0 | 5 | 46 |
|
||||
| [docs/stage10.md](/docs/stage10.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage11.md](/docs/stage11.md) | Markdown | 36 | 0 | 5 | 41 |
|
||||
| [docs/stage12.md](/docs/stage12.md) | Markdown | 40 | 0 | 6 | 46 |
|
||||
| [docs/stage13.md](/docs/stage13.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage14.md](/docs/stage14.md) | Markdown | 44 | 0 | 8 | 52 |
|
||||
| [docs/stage15.md](/docs/stage15.md) | Markdown | 47 | 0 | 7 | 54 |
|
||||
| [docs/stage2.md](/docs/stage2.md) | Markdown | 30 | 0 | 5 | 35 |
|
||||
| [docs/stage20.md](/docs/stage20.md) | Markdown | 46 | 0 | 6 | 52 |
|
||||
| [docs/stage21.md](/docs/stage21.md) | Markdown | 72 | 0 | 7 | 79 |
|
||||
| [docs/stage22.md](/docs/stage22.md) | Markdown | 68 | 0 | 7 | 75 |
|
||||
| [docs/stage23.md](/docs/stage23.md) | Markdown | 41 | 0 | 6 | 47 |
|
||||
| [docs/stage24.md](/docs/stage24.md) | Markdown | 42 | 0 | 7 | 49 |
|
||||
| [docs/stage25.md](/docs/stage25.md) | Markdown | 58 | 0 | 7 | 65 |
|
||||
| [docs/stage26.md](/docs/stage26.md) | Markdown | 32 | 0 | 7 | 39 |
|
||||
| [docs/stage27.md](/docs/stage27.md) | Markdown | 32 | 0 | 7 | 39 |
|
||||
| [docs/stage28.md](/docs/stage28.md) | Markdown | 37 | 0 | 7 | 44 |
|
||||
| [docs/stage29.md](/docs/stage29.md) | Markdown | 33 | 0 | 7 | 40 |
|
||||
| [docs/stage3.md](/docs/stage3.md) | Markdown | 29 | 0 | 5 | 34 |
|
||||
| [docs/stage4.md](/docs/stage4.md) | Markdown | 30 | 0 | 5 | 35 |
|
||||
| [docs/stage5.md](/docs/stage5.md) | Markdown | 29 | 0 | 5 | 34 |
|
||||
| [docs/stage6.md](/docs/stage6.md) | Markdown | 30 | 0 | 6 | 36 |
|
||||
| [docs/stage7.md](/docs/stage7.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage8.md](/docs/stage8.md) | Markdown | 31 | 0 | 6 | 37 |
|
||||
| [docs/stage9.md](/docs/stage9.md) | Markdown | 31 | 0 | 6 | 37 |
|
||||
| [docs/syscall.md](/docs/syscall.md) | Markdown | 453 | 0 | 192 | 645 |
|
||||
| [ramdisk/shell/init.cmd](/ramdisk/shell/init.cmd) | Batch | 4 | 0 | 2 | 6 |
|
||||
| [scripts/gen-tty-psf.ps1](/scripts/gen-tty-psf.ps1) | PowerShell | 171 | 2 | 42 | 215 |
|
||||
| [wine/README.md](/wine/README.md) | Markdown | 49 | 0 | 19 | 68 |
|
||||
| [wine/cleonos\_wine.py](/wine/cleonos_wine.py) | Python | 3 | 1 | 3 | 7 |
|
||||
| [wine/cleonos\_wine\_lib/\_\_init\_\_.py](/wine/cleonos_wine_lib/__init__.py) | Python | 4 | 0 | 1 | 5 |
|
||||
| [wine/cleonos\_wine\_lib/cli.py](/wine/cleonos_wine_lib/cli.py) | Python | 44 | 0 | 10 | 54 |
|
||||
| [wine/cleonos\_wine\_lib/constants.py](/wine/cleonos_wine_lib/constants.py) | Python | 76 | 1 | 11 | 88 |
|
||||
| [wine/cleonos\_wine\_lib/input\_pump.py](/wine/cleonos_wine_lib/input_pump.py) | Python | 82 | 0 | 17 | 99 |
|
||||
| [wine/cleonos\_wine\_lib/platform.py](/wine/cleonos_wine_lib/platform.py) | Python | 55 | 0 | 5 | 60 |
|
||||
| [wine/cleonos\_wine\_lib/runner.py](/wine/cleonos_wine_lib/runner.py) | Python | 990 | 0 | 175 | 1,165 |
|
||||
| [wine/cleonos\_wine\_lib/state.py](/wine/cleonos_wine_lib/state.py) | Python | 164 | 0 | 40 | 204 |
|
||||
| [wine/requirements.txt](/wine/requirements.txt) | pip requirements | 1 | 0 | 1 | 2 |
|
||||
|
||||
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
28
.VSCodeCounter/2026-04-17_22-23-18/diff-details.md
Normal file
28
.VSCodeCounter/2026-04-17_22-23-18/diff-details.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Diff Details
|
||||
|
||||
Date : 2026-04-17 22:23:18
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 13 files, 1083 codes, 0 comments, 263 blanks, all 1346 lines
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
||||
|
||||
## Files
|
||||
| filename | language | code | comment | blank | total |
|
||||
| :--- | :--- | ---: | ---: | ---: | ---: |
|
||||
| [CMakeLists.txt](/CMakeLists.txt) | CMake | 1 | 0 | 0 | 1 |
|
||||
| [cleonos/c/apps/help\_main.c](/cleonos/c/apps/help_main.c) | C | 1 | 0 | 0 | 1 |
|
||||
| [cleonos/c/apps/procstat\_main.c](/cleonos/c/apps/procstat_main.c) | C | 202 | 0 | 43 | 245 |
|
||||
| [cleonos/c/apps/shell/shell\_cmd.c](/cleonos/c/apps/shell/shell_cmd.c) | C | 1 | 0 | 0 | 1 |
|
||||
| [cleonos/c/apps/shell/shell\_input.c](/cleonos/c/apps/shell/shell_input.c) | C | 49 | 0 | 15 | 64 |
|
||||
| [cleonos/c/apps/sysstat\_main.c](/cleonos/c/apps/sysstat_main.c) | C | 267 | 0 | 45 | 312 |
|
||||
| [cleonos/c/include/cleonos\_syscall.h](/cleonos/c/include/cleonos_syscall.h) | C++ | 24 | 0 | 1 | 25 |
|
||||
| [cleonos/c/src/syscall.c](/cleonos/c/src/syscall.c) | C | 27 | 0 | 9 | 36 |
|
||||
| [clks/include/clks/exec.h](/clks/include/clks/exec.h) | C++ | 5 | 0 | 0 | 5 |
|
||||
| [clks/include/clks/syscall.h](/clks/include/clks/syscall.h) | C++ | 9 | 0 | 0 | 9 |
|
||||
| [clks/kernel/exec.c](/clks/kernel/exec.c) | C | 319 | 0 | 100 | 419 |
|
||||
| [clks/kernel/syscall.c](/clks/kernel/syscall.c) | C | 105 | 0 | 26 | 131 |
|
||||
| [docs/syscall.md](/docs/syscall.md) | Markdown | 73 | 0 | 24 | 97 |
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
||||
15
.VSCodeCounter/2026-04-17_22-23-18/diff.csv
Normal file
15
.VSCodeCounter/2026-04-17_22-23-18/diff.csv
Normal file
@@ -0,0 +1,15 @@
|
||||
"filename", "language", "CMake", "C", "Markdown", "C++", "comment", "blank", "total"
|
||||
"d:\Projects\C\cleonos\CMakeLists.txt", "CMake", 1, 0, 0, 0, 0, 0, 1
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\help_main.c", "C", 0, 1, 0, 0, 0, 0, 1
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\procstat_main.c", "C", 0, 202, 0, 0, 0, 43, 245
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c", "C", 0, 1, 0, 0, 0, 0, 1
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c", "C", 0, 49, 0, 0, 0, 15, 64
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\sysstat_main.c", "C", 0, 267, 0, 0, 0, 45, 312
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h", "C++", 0, 0, 0, 24, 0, 1, 25
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\syscall.c", "C", 0, 27, 0, 0, 0, 9, 36
|
||||
"d:\Projects\C\cleonos\clks\include\clks\exec.h", "C++", 0, 0, 0, 5, 0, 0, 5
|
||||
"d:\Projects\C\cleonos\clks\include\clks\syscall.h", "C++", 0, 0, 0, 9, 0, 0, 9
|
||||
"d:\Projects\C\cleonos\clks\kernel\exec.c", "C", 0, 319, 0, 0, 0, 100, 419
|
||||
"d:\Projects\C\cleonos\clks\kernel\syscall.c", "C", 0, 105, 0, 0, 0, 26, 131
|
||||
"d:\Projects\C\cleonos\docs\syscall.md", "Markdown", 0, 0, 73, 0, 0, 24, 97
|
||||
"Total", "-", 1, 971, 73, 38, 0, 263, 1346
|
||||
|
37
.VSCodeCounter/2026-04-17_22-23-18/diff.md
Normal file
37
.VSCodeCounter/2026-04-17_22-23-18/diff.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Diff Summary
|
||||
|
||||
Date : 2026-04-17 22:23:18
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 13 files, 1083 codes, 0 comments, 263 blanks, all 1346 lines
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
||||
|
||||
## Languages
|
||||
| language | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| C | 8 | 971 | 0 | 238 | 1,209 |
|
||||
| Markdown | 1 | 73 | 0 | 24 | 97 |
|
||||
| C++ | 3 | 38 | 0 | 1 | 39 |
|
||||
| CMake | 1 | 1 | 0 | 0 | 1 |
|
||||
|
||||
## Directories
|
||||
| path | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| . | 13 | 1,083 | 0 | 263 | 1,346 |
|
||||
| . (Files) | 1 | 1 | 0 | 0 | 1 |
|
||||
| cleonos | 7 | 571 | 0 | 113 | 684 |
|
||||
| cleonos\\c | 7 | 571 | 0 | 113 | 684 |
|
||||
| cleonos\\c\\apps | 5 | 520 | 0 | 103 | 623 |
|
||||
| cleonos\\c\\apps (Files) | 3 | 470 | 0 | 88 | 558 |
|
||||
| cleonos\\c\\apps\\shell | 2 | 50 | 0 | 15 | 65 |
|
||||
| cleonos\\c\\include | 1 | 24 | 0 | 1 | 25 |
|
||||
| cleonos\\c\\src | 1 | 27 | 0 | 9 | 36 |
|
||||
| clks | 4 | 438 | 0 | 126 | 564 |
|
||||
| clks\\include | 2 | 14 | 0 | 0 | 14 |
|
||||
| clks\\include\\clks | 2 | 14 | 0 | 0 | 14 |
|
||||
| clks\\kernel | 2 | 424 | 0 | 126 | 550 |
|
||||
| docs | 1 | 73 | 0 | 24 | 97 |
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
||||
53
.VSCodeCounter/2026-04-17_22-23-18/diff.txt
Normal file
53
.VSCodeCounter/2026-04-17_22-23-18/diff.txt
Normal file
@@ -0,0 +1,53 @@
|
||||
Date : 2026-04-17 22:23:18
|
||||
Directory : d:\Projects\C\cleonos
|
||||
Total : 13 files, 1083 codes, 0 comments, 263 blanks, all 1346 lines
|
||||
|
||||
Languages
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
| language | files | code | comment | blank | total |
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
| C | 8 | 971 | 0 | 238 | 1,209 |
|
||||
| Markdown | 1 | 73 | 0 | 24 | 97 |
|
||||
| C++ | 3 | 38 | 0 | 1 | 39 |
|
||||
| CMake | 1 | 1 | 0 | 0 | 1 |
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
|
||||
Directories
|
||||
+-----------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| path | files | code | comment | blank | total |
|
||||
+-----------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| . | 13 | 1,083 | 0 | 263 | 1,346 |
|
||||
| . (Files) | 1 | 1 | 0 | 0 | 1 |
|
||||
| cleonos | 7 | 571 | 0 | 113 | 684 |
|
||||
| cleonos\c | 7 | 571 | 0 | 113 | 684 |
|
||||
| cleonos\c\apps | 5 | 520 | 0 | 103 | 623 |
|
||||
| cleonos\c\apps (Files) | 3 | 470 | 0 | 88 | 558 |
|
||||
| cleonos\c\apps\shell | 2 | 50 | 0 | 15 | 65 |
|
||||
| cleonos\c\include | 1 | 24 | 0 | 1 | 25 |
|
||||
| cleonos\c\src | 1 | 27 | 0 | 9 | 36 |
|
||||
| clks | 4 | 438 | 0 | 126 | 564 |
|
||||
| clks\include | 2 | 14 | 0 | 0 | 14 |
|
||||
| clks\include\clks | 2 | 14 | 0 | 0 | 14 |
|
||||
| clks\kernel | 2 | 424 | 0 | 126 | 550 |
|
||||
| docs | 1 | 73 | 0 | 24 | 97 |
|
||||
+-----------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Files
|
||||
+-----------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
| filename | language | code | comment | blank | total |
|
||||
+-----------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
| d:\Projects\C\cleonos\CMakeLists.txt | CMake | 1 | 0 | 0 | 1 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\help_main.c | C | 1 | 0 | 0 | 1 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\procstat_main.c | C | 202 | 0 | 43 | 245 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c | C | 1 | 0 | 0 | 1 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c | C | 49 | 0 | 15 | 64 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\sysstat_main.c | C | 267 | 0 | 45 | 312 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h | C++ | 24 | 0 | 1 | 25 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\syscall.c | C | 27 | 0 | 9 | 36 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\exec.h | C++ | 5 | 0 | 0 | 5 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\syscall.h | C++ | 9 | 0 | 0 | 9 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\exec.c | C | 319 | 0 | 100 | 419 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\syscall.c | C | 105 | 0 | 26 | 131 |
|
||||
| d:\Projects\C\cleonos\docs\syscall.md | Markdown | 73 | 0 | 24 | 97 |
|
||||
| Total | | 1,083 | 0 | 263 | 1,346 |
|
||||
+-----------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
196
.VSCodeCounter/2026-04-17_22-23-18/results.csv
Normal file
196
.VSCodeCounter/2026-04-17_22-23-18/results.csv
Normal file
@@ -0,0 +1,196 @@
|
||||
"filename", "language", "Python", "pip requirements", "Markdown", "PowerShell", "Makefile", "CMake", "Properties", "Rust", "C", "YAML", "Batch", "C++", "Go Assembly", "comment", "blank", "total"
|
||||
"d:\Projects\C\cleonos\.github\workflows\build-os.yml", "YAML", 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 10, 58
|
||||
"d:\Projects\C\cleonos\CMakeLists.txt", "CMake", 0, 0, 0, 0, 0, 615, 0, 0, 0, 0, 0, 0, 0, 0, 88, 703
|
||||
"d:\Projects\C\cleonos\Makefile", "Makefile", 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 122
|
||||
"d:\Projects\C\cleonos\README.md", "Markdown", 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 126
|
||||
"d:\Projects\C\cleonos\README.zh-CN.md", "Markdown", 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 126
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ansi_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 11, 54
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ansitest_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 142, 0, 0, 0, 0, 0, 35, 177
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\append_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 18, 92
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\args_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 13, 62
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\bg_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 26, 127
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, 0, 0, 24, 107
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cd_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 15, 69
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\clear_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 446, 0, 0, 0, 0, 0, 143, 589
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 19, 99
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cp_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, 0, 0, 0, 0, 26, 121
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cut_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 214, 0, 0, 0, 0, 1, 55, 270
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\dmesg_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 18, 82
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_kmain.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\exec_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, 22, 109
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\exit_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 14, 68
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fastfetch_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 180, 0, 0, 0, 0, 0, 34, 214
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fg_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 150, 0, 0, 0, 0, 0, 36, 186
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fsstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 11, 56
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\grep_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 195, 0, 0, 0, 0, 0, 54, 249
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\head_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, 0, 0, 0, 0, 47, 211
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\hello_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 8
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\help_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, 10, 90
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\jobs_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 26, 146
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\kbdstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, 11, 55
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\kdbg_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 214, 0, 0, 0, 0, 0, 56, 270
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\kill_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 144, 0, 0, 0, 0, 0, 39, 183
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ls_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 262, 0, 0, 0, 0, 0, 76, 338
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memc_kmain.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memc_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 3, 11
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 11, 54
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\mkdir_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 16, 73
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\mv_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 28, 130
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\pid_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\procstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 202, 0, 0, 0, 0, 0, 43, 245
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ps_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 160, 0, 0, 0, 0, 0, 35, 195
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\pwd_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\restart_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 11, 51
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\rm_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 16, 73
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 2315, 0, 0, 0, 0, 0, 574, 2889
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_external.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 55, 221
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 563, 0, 0, 0, 0, 0, 147, 710
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_internal.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 0, 0, 20, 112
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_path.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 153, 0, 0, 0, 0, 0, 50, 203
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_script.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 12, 47
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_util.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 283, 0, 0, 0, 0, 0, 86, 369
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 6, 25
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 11, 56
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shutdown_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 11, 51
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\sleep_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 14, 66
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\sort_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 205, 0, 0, 0, 0, 0, 63, 268
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\spawn_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 20, 96
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\spin_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 4, 17
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\stats_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 17, 119
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\sysstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 267, 0, 0, 0, 0, 0, 45, 312
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\tail_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 190, 0, 0, 0, 0, 0, 54, 244
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\taskstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 11, 54
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\top_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 195, 0, 0, 0, 0, 0, 47, 242
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\touch_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 16, 74
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\tty_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 17, 81
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ttydrv_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\uniq_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 168, 0, 0, 0, 0, 0, 48, 216
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\userstat_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 11, 59
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wait_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 17, 85
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wavplay_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 396, 0, 0, 0, 0, 0, 99, 495
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wc_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, 0, 0, 0, 0, 45, 209
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\write_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 18, 92
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\yield_main.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_rust_bridge.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 4, 10
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 10, 202
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\runtime.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 12, 49
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\syscall.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 250, 0, 0, 0, 0, 0, 83, 333
|
||||
"d:\Projects\C\cleonos\cleonos\c\stub.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 4, 2, 9
|
||||
"d:\Projects\C\cleonos\cleonos\rust\src\lib.rs", "Rust", 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 9, 32
|
||||
"d:\Projects\C\cleonos\clks\arch\aarch64\boot.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\boot.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\exec_stack_call.S", "Go Assembly", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 8, 48
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\interrupt_stubs.S", "Go Assembly", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 0, 12, 120
|
||||
"d:\Projects\C\cleonos\clks\drivers\audio\pcspeaker.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 25, 126
|
||||
"d:\Projects\C\cleonos\clks\drivers\serial\serial.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 16, 68
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\font8x8.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0, 0, 8, 75
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\font8x8.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 3, 8
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\framebuffer.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 251, 0, 0, 0, 0, 0, 70, 321
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\psf_font.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, 0, 0, 0, 0, 56, 286
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\psf_font.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 5, 20
|
||||
"d:\Projects\C\cleonos\clks\include\clks\audio.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 3, 12
|
||||
"d:\Projects\C\cleonos\clks\include\clks\boot.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 4, 15
|
||||
"d:\Projects\C\cleonos\clks\include\clks\compiler.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 4, 17
|
||||
"d:\Projects\C\cleonos\clks\include\clks\cpu.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 4, 24
|
||||
"d:\Projects\C\cleonos\clks\include\clks\desktop.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 4, 11
|
||||
"d:\Projects\C\cleonos\clks\include\clks\driver.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 8, 37
|
||||
"d:\Projects\C\cleonos\clks\include\clks\elf64.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 9, 41
|
||||
"d:\Projects\C\cleonos\clks\include\clks\elfrunner.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\clks\include\clks\exec.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 8, 79
|
||||
"d:\Projects\C\cleonos\clks\include\clks\framebuffer.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 6, 32
|
||||
"d:\Projects\C\cleonos\clks\include\clks\fs.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 7, 30
|
||||
"d:\Projects\C\cleonos\clks\include\clks\heap.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 4, 19
|
||||
"d:\Projects\C\cleonos\clks\include\clks\interrupts.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\clks\include\clks\kelf.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 5, 14
|
||||
"d:\Projects\C\cleonos\clks\include\clks\kernel.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 2, 6
|
||||
"d:\Projects\C\cleonos\clks\include\clks\keyboard.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 6, 33
|
||||
"d:\Projects\C\cleonos\clks\include\clks\limine.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 0, 0, 24, 156
|
||||
"d:\Projects\C\cleonos\clks\include\clks\log.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 5, 19
|
||||
"d:\Projects\C\cleonos\clks\include\clks\mouse.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 6, 26
|
||||
"d:\Projects\C\cleonos\clks\include\clks\panic.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 4, 16
|
||||
"d:\Projects\C\cleonos\clks\include\clks\pmm.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 5, 21
|
||||
"d:\Projects\C\cleonos\clks\include\clks\ramdisk.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 8, 25
|
||||
"d:\Projects\C\cleonos\clks\include\clks\scheduler.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 5, 23
|
||||
"d:\Projects\C\cleonos\clks\include\clks\serial.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 2, 8
|
||||
"d:\Projects\C\cleonos\clks\include\clks\service.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 8, 39
|
||||
"d:\Projects\C\cleonos\clks\include\clks\shell.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 3, 10
|
||||
"d:\Projects\C\cleonos\clks\include\clks\string.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 3, 12
|
||||
"d:\Projects\C\cleonos\clks\include\clks\syscall.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, 5, 89
|
||||
"d:\Projects\C\cleonos\clks\include\clks\task.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 7, 31
|
||||
"d:\Projects\C\cleonos\clks\include\clks\tty.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 4, 18
|
||||
"d:\Projects\C\cleonos\clks\include\clks\types.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 6, 23
|
||||
"d:\Projects\C\cleonos\clks\include\clks\userland.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 4, 16
|
||||
"d:\Projects\C\cleonos\clks\kernel\desktop.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 321, 0, 0, 0, 0, 0, 86, 407
|
||||
"d:\Projects\C\cleonos\clks\kernel\driver.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 169, 0, 0, 0, 0, 0, 49, 218
|
||||
"d:\Projects\C\cleonos\clks\kernel\elf64.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 239, 0, 0, 0, 0, 0, 73, 312
|
||||
"d:\Projects\C\cleonos\clks\kernel\elfrunner.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 8, 38
|
||||
"d:\Projects\C\cleonos\clks\kernel\exec.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 1522, 0, 0, 0, 0, 1, 435, 1958
|
||||
"d:\Projects\C\cleonos\clks\kernel\fs.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 698, 0, 0, 0, 0, 0, 220, 918
|
||||
"d:\Projects\C\cleonos\clks\kernel\heap.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 134, 0, 0, 0, 0, 0, 42, 176
|
||||
"d:\Projects\C\cleonos\clks\kernel\interrupts.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 317, 0, 0, 0, 0, 0, 44, 361
|
||||
"d:\Projects\C\cleonos\clks\kernel\kelf.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 1, 53, 257
|
||||
"d:\Projects\C\cleonos\clks\kernel\keyboard.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 351, 0, 0, 0, 0, 0, 88, 439
|
||||
"d:\Projects\C\cleonos\clks\kernel\kmain.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, 0, 1, 52, 253
|
||||
"d:\Projects\C\cleonos\clks\kernel\limine_requests.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 26, 102
|
||||
"d:\Projects\C\cleonos\clks\kernel\log.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 185, 0, 0, 0, 0, 0, 48, 233
|
||||
"d:\Projects\C\cleonos\clks\kernel\mouse.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 246, 0, 0, 0, 0, 0, 63, 309
|
||||
"d:\Projects\C\cleonos\clks\kernel\panic.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 546, 0, 0, 0, 0, 0, 155, 701
|
||||
"d:\Projects\C\cleonos\clks\kernel\pmm.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 82, 0, 0, 0, 0, 0, 23, 105
|
||||
"d:\Projects\C\cleonos\clks\kernel\ramdisk.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, 50, 222
|
||||
"d:\Projects\C\cleonos\clks\kernel\scheduler.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 44, 180
|
||||
"d:\Projects\C\cleonos\clks\kernel\service.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 34, 147
|
||||
"d:\Projects\C\cleonos\clks\kernel\shell.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 1249, 0, 0, 0, 0, 0, 317, 1566
|
||||
"d:\Projects\C\cleonos\clks\kernel\syscall.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 1480, 0, 0, 0, 0, 0, 370, 1850
|
||||
"d:\Projects\C\cleonos\clks\kernel\tty.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 1115, 0, 0, 0, 0, 0, 275, 1390
|
||||
"d:\Projects\C\cleonos\clks\kernel\userland.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 124, 0, 0, 0, 0, 0, 35, 159
|
||||
"d:\Projects\C\cleonos\clks\lib\libc_compat.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 7, 32
|
||||
"d:\Projects\C\cleonos\clks\lib\string.c", "C", 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 16, 70
|
||||
"d:\Projects\C\cleonos\clks\rust\src\lib.rs", "Rust", 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 6, 27
|
||||
"d:\Projects\C\cleonos\cmake\check_tools.cmake", "CMake", 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 7, 41
|
||||
"d:\Projects\C\cleonos\cmake\gen_kernel_symbols.cmake", "CMake", 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 26, 106
|
||||
"d:\Projects\C\cleonos\cmake\log.cmake", "CMake", 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 6, 36
|
||||
"d:\Projects\C\cleonos\cmake\log_emit.cmake", "CMake", 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 6, 29
|
||||
"d:\Projects\C\cleonos\cmake\setup_limine.cmake", "CMake", 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 19, 119
|
||||
"d:\Projects\C\cleonos\configs\limine.conf", "Properties", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\docs\README.md", "Markdown", 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 35
|
||||
"d:\Projects\C\cleonos\docs\stage1.md", "Markdown", 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 46
|
||||
"d:\Projects\C\cleonos\docs\stage10.md", "Markdown", 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage11.md", "Markdown", 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 41
|
||||
"d:\Projects\C\cleonos\docs\stage12.md", "Markdown", 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 46
|
||||
"d:\Projects\C\cleonos\docs\stage13.md", "Markdown", 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage14.md", "Markdown", 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 52
|
||||
"d:\Projects\C\cleonos\docs\stage15.md", "Markdown", 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 54
|
||||
"d:\Projects\C\cleonos\docs\stage2.md", "Markdown", 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 35
|
||||
"d:\Projects\C\cleonos\docs\stage20.md", "Markdown", 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 52
|
||||
"d:\Projects\C\cleonos\docs\stage21.md", "Markdown", 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 79
|
||||
"d:\Projects\C\cleonos\docs\stage22.md", "Markdown", 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 75
|
||||
"d:\Projects\C\cleonos\docs\stage23.md", "Markdown", 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 47
|
||||
"d:\Projects\C\cleonos\docs\stage24.md", "Markdown", 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 49
|
||||
"d:\Projects\C\cleonos\docs\stage25.md", "Markdown", 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 65
|
||||
"d:\Projects\C\cleonos\docs\stage26.md", "Markdown", 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 39
|
||||
"d:\Projects\C\cleonos\docs\stage27.md", "Markdown", 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 39
|
||||
"d:\Projects\C\cleonos\docs\stage28.md", "Markdown", 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 44
|
||||
"d:\Projects\C\cleonos\docs\stage29.md", "Markdown", 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 40
|
||||
"d:\Projects\C\cleonos\docs\stage3.md", "Markdown", 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 34
|
||||
"d:\Projects\C\cleonos\docs\stage4.md", "Markdown", 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 35
|
||||
"d:\Projects\C\cleonos\docs\stage5.md", "Markdown", 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 34
|
||||
"d:\Projects\C\cleonos\docs\stage6.md", "Markdown", 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 36
|
||||
"d:\Projects\C\cleonos\docs\stage7.md", "Markdown", 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage8.md", "Markdown", 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 37
|
||||
"d:\Projects\C\cleonos\docs\stage9.md", "Markdown", 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 37
|
||||
"d:\Projects\C\cleonos\docs\syscall.md", "Markdown", 0, 0, 453, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 645
|
||||
"d:\Projects\C\cleonos\ramdisk\shell\init.cmd", "Batch", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, 6
|
||||
"d:\Projects\C\cleonos\scripts\gen-tty-psf.ps1", "PowerShell", 0, 0, 0, 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 42, 215
|
||||
"d:\Projects\C\cleonos\wine\README.md", "Markdown", 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 68
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine.py", "Python", 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 7
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\__init__.py", "Python", 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\cli.py", "Python", 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 54
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\constants.py", "Python", 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 11, 88
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\input_pump.py", "Python", 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 99
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\platform.py", "Python", 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 60
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\runner.py", "Python", 990, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 1165
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\state.py", "Python", 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 204
|
||||
"d:\Projects\C\cleonos\wine\requirements.txt", "pip requirements", 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2
|
||||
"Total", "-", 1418, 1, 1698, 171, 100, 882, 6, 44, 20551, 48, 4, 1131, 148, 12, 6631, 32845
|
||||
|
1
.VSCodeCounter/2026-04-17_22-23-18/results.json
Normal file
1
.VSCodeCounter/2026-04-17_22-23-18/results.json
Normal file
File diff suppressed because one or more lines are too long
69
.VSCodeCounter/2026-04-17_22-23-18/results.md
Normal file
69
.VSCodeCounter/2026-04-17_22-23-18/results.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# Summary
|
||||
|
||||
Date : 2026-04-17 22:23:18
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 194 files, 26202 codes, 12 comments, 6631 blanks, all 32845 lines
|
||||
|
||||
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
|
||||
## Languages
|
||||
| language | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| C | 102 | 20,551 | 8 | 5,426 | 25,985 |
|
||||
| Markdown | 30 | 1,698 | 0 | 438 | 2,136 |
|
||||
| Python | 8 | 1,418 | 2 | 262 | 1,682 |
|
||||
| C++ | 38 | 1,131 | 0 | 240 | 1,371 |
|
||||
| CMake | 6 | 882 | 0 | 152 | 1,034 |
|
||||
| PowerShell | 1 | 171 | 2 | 42 | 215 |
|
||||
| Go Assembly | 2 | 148 | 0 | 20 | 168 |
|
||||
| Makefile | 1 | 100 | 0 | 22 | 122 |
|
||||
| YAML | 1 | 48 | 0 | 10 | 58 |
|
||||
| Rust | 2 | 44 | 0 | 15 | 59 |
|
||||
| Properties | 1 | 6 | 0 | 1 | 7 |
|
||||
| Batch | 1 | 4 | 0 | 2 | 6 |
|
||||
| pip requirements | 1 | 1 | 0 | 1 | 2 |
|
||||
|
||||
## Directories
|
||||
| path | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| . | 194 | 26,202 | 12 | 6,631 | 32,845 |
|
||||
| . (Files) | 4 | 899 | 0 | 178 | 1,077 |
|
||||
| .github | 1 | 48 | 0 | 10 | 58 |
|
||||
| .github\\workflows | 1 | 48 | 0 | 10 | 58 |
|
||||
| cleonos | 75 | 10,444 | 5 | 2,698 | 13,147 |
|
||||
| cleonos\\c | 74 | 10,421 | 5 | 2,689 | 13,115 |
|
||||
| cleonos\\c (Files) | 1 | 3 | 4 | 2 | 9 |
|
||||
| cleonos\\c\\apps | 69 | 9,933 | 1 | 2,578 | 12,512 |
|
||||
| cleonos\\c\\apps (Files) | 62 | 6,326 | 1 | 1,634 | 7,961 |
|
||||
| cleonos\\c\\apps\\shell | 7 | 3,607 | 0 | 944 | 4,551 |
|
||||
| cleonos\\c\\include | 2 | 198 | 0 | 14 | 212 |
|
||||
| cleonos\\c\\src | 2 | 287 | 0 | 95 | 382 |
|
||||
| cleonos\\rust | 1 | 23 | 0 | 9 | 32 |
|
||||
| cleonos\\rust\\src | 1 | 23 | 0 | 9 | 32 |
|
||||
| clks | 69 | 11,430 | 3 | 3,003 | 14,436 |
|
||||
| clks\\arch | 4 | 160 | 0 | 22 | 182 |
|
||||
| clks\\arch\\aarch64 | 1 | 6 | 0 | 1 | 7 |
|
||||
| clks\\arch\\x86_64 | 3 | 154 | 0 | 21 | 175 |
|
||||
| clks\\drivers | 7 | 721 | 0 | 183 | 904 |
|
||||
| clks\\drivers\\audio | 1 | 101 | 0 | 25 | 126 |
|
||||
| clks\\drivers\\serial | 1 | 52 | 0 | 16 | 68 |
|
||||
| clks\\drivers\\video | 5 | 568 | 0 | 142 | 710 |
|
||||
| clks\\include | 32 | 741 | 0 | 179 | 920 |
|
||||
| clks\\include\\clks | 32 | 741 | 0 | 179 | 920 |
|
||||
| clks\\kernel | 23 | 9,708 | 3 | 2,590 | 12,301 |
|
||||
| clks\\lib | 2 | 79 | 0 | 23 | 102 |
|
||||
| clks\\rust | 1 | 21 | 0 | 6 | 27 |
|
||||
| clks\\rust\\src | 1 | 21 | 0 | 6 | 27 |
|
||||
| cmake | 5 | 267 | 0 | 64 | 331 |
|
||||
| configs | 1 | 6 | 0 | 1 | 7 |
|
||||
| docs | 27 | 1,465 | 0 | 351 | 1,816 |
|
||||
| ramdisk | 1 | 4 | 0 | 2 | 6 |
|
||||
| ramdisk\\shell | 1 | 4 | 0 | 2 | 6 |
|
||||
| scripts | 1 | 171 | 2 | 42 | 215 |
|
||||
| wine | 10 | 1,468 | 2 | 282 | 1,752 |
|
||||
| wine (Files) | 3 | 53 | 1 | 23 | 77 |
|
||||
| wine\\cleonos_wine_lib | 7 | 1,415 | 1 | 259 | 1,675 |
|
||||
|
||||
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
266
.VSCodeCounter/2026-04-17_22-23-18/results.txt
Normal file
266
.VSCodeCounter/2026-04-17_22-23-18/results.txt
Normal file
@@ -0,0 +1,266 @@
|
||||
Date : 2026-04-17 22:23:18
|
||||
Directory : d:\Projects\C\cleonos
|
||||
Total : 194 files, 26202 codes, 12 comments, 6631 blanks, all 32845 lines
|
||||
|
||||
Languages
|
||||
+------------------+------------+------------+------------+------------+------------+
|
||||
| language | files | code | comment | blank | total |
|
||||
+------------------+------------+------------+------------+------------+------------+
|
||||
| C | 102 | 20,551 | 8 | 5,426 | 25,985 |
|
||||
| Markdown | 30 | 1,698 | 0 | 438 | 2,136 |
|
||||
| Python | 8 | 1,418 | 2 | 262 | 1,682 |
|
||||
| C++ | 38 | 1,131 | 0 | 240 | 1,371 |
|
||||
| CMake | 6 | 882 | 0 | 152 | 1,034 |
|
||||
| PowerShell | 1 | 171 | 2 | 42 | 215 |
|
||||
| Go Assembly | 2 | 148 | 0 | 20 | 168 |
|
||||
| Makefile | 1 | 100 | 0 | 22 | 122 |
|
||||
| YAML | 1 | 48 | 0 | 10 | 58 |
|
||||
| Rust | 2 | 44 | 0 | 15 | 59 |
|
||||
| Properties | 1 | 6 | 0 | 1 | 7 |
|
||||
| Batch | 1 | 4 | 0 | 2 | 6 |
|
||||
| pip requirements | 1 | 1 | 0 | 1 | 2 |
|
||||
+------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Directories
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| path | files | code | comment | blank | total |
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| . | 194 | 26,202 | 12 | 6,631 | 32,845 |
|
||||
| . (Files) | 4 | 899 | 0 | 178 | 1,077 |
|
||||
| .github | 1 | 48 | 0 | 10 | 58 |
|
||||
| .github\workflows | 1 | 48 | 0 | 10 | 58 |
|
||||
| cleonos | 75 | 10,444 | 5 | 2,698 | 13,147 |
|
||||
| cleonos\c | 74 | 10,421 | 5 | 2,689 | 13,115 |
|
||||
| cleonos\c (Files) | 1 | 3 | 4 | 2 | 9 |
|
||||
| cleonos\c\apps | 69 | 9,933 | 1 | 2,578 | 12,512 |
|
||||
| cleonos\c\apps (Files) | 62 | 6,326 | 1 | 1,634 | 7,961 |
|
||||
| cleonos\c\apps\shell | 7 | 3,607 | 0 | 944 | 4,551 |
|
||||
| cleonos\c\include | 2 | 198 | 0 | 14 | 212 |
|
||||
| cleonos\c\src | 2 | 287 | 0 | 95 | 382 |
|
||||
| cleonos\rust | 1 | 23 | 0 | 9 | 32 |
|
||||
| cleonos\rust\src | 1 | 23 | 0 | 9 | 32 |
|
||||
| clks | 69 | 11,430 | 3 | 3,003 | 14,436 |
|
||||
| clks\arch | 4 | 160 | 0 | 22 | 182 |
|
||||
| clks\arch\aarch64 | 1 | 6 | 0 | 1 | 7 |
|
||||
| clks\arch\x86_64 | 3 | 154 | 0 | 21 | 175 |
|
||||
| clks\drivers | 7 | 721 | 0 | 183 | 904 |
|
||||
| clks\drivers\audio | 1 | 101 | 0 | 25 | 126 |
|
||||
| clks\drivers\serial | 1 | 52 | 0 | 16 | 68 |
|
||||
| clks\drivers\video | 5 | 568 | 0 | 142 | 710 |
|
||||
| clks\include | 32 | 741 | 0 | 179 | 920 |
|
||||
| clks\include\clks | 32 | 741 | 0 | 179 | 920 |
|
||||
| clks\kernel | 23 | 9,708 | 3 | 2,590 | 12,301 |
|
||||
| clks\lib | 2 | 79 | 0 | 23 | 102 |
|
||||
| clks\rust | 1 | 21 | 0 | 6 | 27 |
|
||||
| clks\rust\src | 1 | 21 | 0 | 6 | 27 |
|
||||
| cmake | 5 | 267 | 0 | 64 | 331 |
|
||||
| configs | 1 | 6 | 0 | 1 | 7 |
|
||||
| docs | 27 | 1,465 | 0 | 351 | 1,816 |
|
||||
| ramdisk | 1 | 4 | 0 | 2 | 6 |
|
||||
| ramdisk\shell | 1 | 4 | 0 | 2 | 6 |
|
||||
| scripts | 1 | 171 | 2 | 42 | 215 |
|
||||
| wine | 10 | 1,468 | 2 | 282 | 1,752 |
|
||||
| wine (Files) | 3 | 53 | 1 | 23 | 77 |
|
||||
| wine\cleonos_wine_lib | 7 | 1,415 | 1 | 259 | 1,675 |
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Files
|
||||
+---------------------------------------------------------------+------------------+------------+------------+------------+------------+
|
||||
| filename | language | code | comment | blank | total |
|
||||
+---------------------------------------------------------------+------------------+------------+------------+------------+------------+
|
||||
| d:\Projects\C\cleonos\.github\workflows\build-os.yml | YAML | 48 | 0 | 10 | 58 |
|
||||
| d:\Projects\C\cleonos\CMakeLists.txt | CMake | 615 | 0 | 88 | 703 |
|
||||
| d:\Projects\C\cleonos\Makefile | Makefile | 100 | 0 | 22 | 122 |
|
||||
| d:\Projects\C\cleonos\README.md | Markdown | 92 | 0 | 34 | 126 |
|
||||
| d:\Projects\C\cleonos\README.zh-CN.md | Markdown | 92 | 0 | 34 | 126 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ansi_main.c | C | 43 | 0 | 11 | 54 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ansitest_main.c | C | 142 | 0 | 35 | 177 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\append_main.c | C | 74 | 0 | 18 | 92 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\args_main.c | C | 49 | 0 | 13 | 62 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\bg_main.c | C | 101 | 0 | 26 | 127 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cat_main.c | C | 83 | 0 | 24 | 107 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cd_main.c | C | 54 | 0 | 15 | 69 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\clear_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.c | C | 446 | 0 | 143 | 589 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.h | C++ | 80 | 0 | 19 | 99 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cp_main.c | C | 95 | 0 | 26 | 121 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cut_main.c | C | 214 | 1 | 55 | 270 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\dmesg_main.c | C | 64 | 0 | 18 | 82 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_kmain.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_main.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\exec_main.c | C | 87 | 0 | 22 | 109 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\exit_main.c | C | 54 | 0 | 14 | 68 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fastfetch_main.c | C | 180 | 0 | 34 | 214 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fg_main.c | C | 150 | 0 | 36 | 186 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fsstat_main.c | C | 45 | 0 | 11 | 56 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\grep_main.c | C | 195 | 0 | 54 | 249 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\head_main.c | C | 164 | 0 | 47 | 211 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\hello_main.c | C | 6 | 0 | 2 | 8 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\help_main.c | C | 80 | 0 | 10 | 90 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\jobs_main.c | C | 120 | 0 | 26 | 146 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\kbdstat_main.c | C | 44 | 0 | 11 | 55 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\kdbg_main.c | C | 214 | 0 | 56 | 270 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\kill_main.c | C | 144 | 0 | 39 | 183 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ls_main.c | C | 262 | 0 | 76 | 338 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memc_kmain.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memc_main.c | C | 8 | 0 | 3 | 11 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memstat_main.c | C | 43 | 0 | 11 | 54 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\mkdir_main.c | C | 57 | 0 | 16 | 73 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\mv_main.c | C | 102 | 0 | 28 | 130 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\pid_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\procstat_main.c | C | 202 | 0 | 43 | 245 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ps_main.c | C | 160 | 0 | 35 | 195 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\pwd_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\restart_main.c | C | 40 | 0 | 11 | 51 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\rm_main.c | C | 57 | 0 | 16 | 73 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c | C | 2,315 | 0 | 574 | 2,889 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_external.c | C | 166 | 0 | 55 | 221 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c | C | 563 | 0 | 147 | 710 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_internal.h | C++ | 92 | 0 | 20 | 112 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_path.c | C | 153 | 0 | 50 | 203 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_script.c | C | 35 | 0 | 12 | 47 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_util.c | C | 283 | 0 | 86 | 369 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell_main.c | C | 19 | 0 | 6 | 25 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shstat_main.c | C | 45 | 0 | 11 | 56 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shutdown_main.c | C | 40 | 0 | 11 | 51 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\sleep_main.c | C | 52 | 0 | 14 | 66 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\sort_main.c | C | 205 | 0 | 63 | 268 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\spawn_main.c | C | 76 | 0 | 20 | 96 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\spin_main.c | C | 13 | 0 | 4 | 17 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\stats_main.c | C | 102 | 0 | 17 | 119 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\sysstat_main.c | C | 267 | 0 | 45 | 312 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\tail_main.c | C | 190 | 0 | 54 | 244 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\taskstat_main.c | C | 43 | 0 | 11 | 54 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\top_main.c | C | 195 | 0 | 47 | 242 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\touch_main.c | C | 58 | 0 | 16 | 74 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\tty_main.c | C | 64 | 0 | 17 | 81 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ttydrv_main.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\uniq_main.c | C | 168 | 0 | 48 | 216 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\userstat_main.c | C | 48 | 0 | 11 | 59 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wait_main.c | C | 68 | 0 | 17 | 85 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wavplay_main.c | C | 396 | 0 | 99 | 495 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wc_main.c | C | 164 | 0 | 45 | 209 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\write_main.c | C | 74 | 0 | 18 | 92 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\yield_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_rust_bridge.h | C++ | 6 | 0 | 4 | 10 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h | C++ | 192 | 0 | 10 | 202 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\runtime.c | C | 37 | 0 | 12 | 49 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\syscall.c | C | 250 | 0 | 83 | 333 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\stub.c | C | 3 | 4 | 2 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\rust\src\lib.rs | Rust | 23 | 0 | 9 | 32 |
|
||||
| d:\Projects\C\cleonos\clks\arch\aarch64\boot.c | C | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\boot.c | C | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\exec_stack_call.S | Go Assembly | 40 | 0 | 8 | 48 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\interrupt_stubs.S | Go Assembly | 108 | 0 | 12 | 120 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\audio\pcspeaker.c | C | 101 | 0 | 25 | 126 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\serial\serial.c | C | 52 | 0 | 16 | 68 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\font8x8.c | C | 67 | 0 | 8 | 75 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\font8x8.h | C++ | 5 | 0 | 3 | 8 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\framebuffer.c | C | 251 | 0 | 70 | 321 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\psf_font.c | C | 230 | 0 | 56 | 286 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\psf_font.h | C++ | 15 | 0 | 5 | 20 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\audio.h | C++ | 9 | 0 | 3 | 12 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\boot.h | C++ | 11 | 0 | 4 | 15 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\compiler.h | C++ | 13 | 0 | 4 | 17 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\cpu.h | C++ | 20 | 0 | 4 | 24 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\desktop.h | C++ | 7 | 0 | 4 | 11 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\driver.h | C++ | 29 | 0 | 8 | 37 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\elf64.h | C++ | 32 | 0 | 9 | 41 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\elfrunner.h | C++ | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\exec.h | C++ | 71 | 0 | 8 | 79 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\framebuffer.h | C++ | 26 | 0 | 6 | 32 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\fs.h | C++ | 23 | 0 | 7 | 30 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\heap.h | C++ | 15 | 0 | 4 | 19 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\interrupts.h | C++ | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\kelf.h | C++ | 9 | 0 | 5 | 14 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\kernel.h | C++ | 4 | 0 | 2 | 6 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\keyboard.h | C++ | 27 | 0 | 6 | 33 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\limine.h | C++ | 132 | 0 | 24 | 156 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\log.h | C++ | 14 | 0 | 5 | 19 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\mouse.h | C++ | 20 | 0 | 6 | 26 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\panic.h | C++ | 12 | 0 | 4 | 16 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\pmm.h | C++ | 16 | 0 | 5 | 21 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\ramdisk.h | C++ | 17 | 0 | 8 | 25 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\scheduler.h | C++ | 18 | 0 | 5 | 23 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\serial.h | C++ | 6 | 0 | 2 | 8 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\service.h | C++ | 31 | 0 | 8 | 39 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\shell.h | C++ | 7 | 0 | 3 | 10 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\string.h | C++ | 9 | 0 | 3 | 12 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\syscall.h | C++ | 84 | 0 | 5 | 89 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\task.h | C++ | 24 | 0 | 7 | 31 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\tty.h | C++ | 14 | 0 | 4 | 18 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\types.h | C++ | 17 | 0 | 6 | 23 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\userland.h | C++ | 12 | 0 | 4 | 16 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\desktop.c | C | 321 | 0 | 86 | 407 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\driver.c | C | 169 | 0 | 49 | 218 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\elf64.c | C | 239 | 0 | 73 | 312 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\elfrunner.c | C | 30 | 0 | 8 | 38 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\exec.c | C | 1,522 | 1 | 435 | 1,958 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\fs.c | C | 698 | 0 | 220 | 918 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\heap.c | C | 134 | 0 | 42 | 176 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\interrupts.c | C | 317 | 0 | 44 | 361 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\kelf.c | C | 203 | 1 | 53 | 257 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\keyboard.c | C | 351 | 0 | 88 | 439 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\kmain.c | C | 200 | 1 | 52 | 253 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\limine_requests.c | C | 76 | 0 | 26 | 102 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\log.c | C | 185 | 0 | 48 | 233 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\mouse.c | C | 246 | 0 | 63 | 309 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\panic.c | C | 546 | 0 | 155 | 701 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\pmm.c | C | 82 | 0 | 23 | 105 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\ramdisk.c | C | 172 | 0 | 50 | 222 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\scheduler.c | C | 136 | 0 | 44 | 180 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\service.c | C | 113 | 0 | 34 | 147 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\shell.c | C | 1,249 | 0 | 317 | 1,566 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\syscall.c | C | 1,480 | 0 | 370 | 1,850 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\tty.c | C | 1,115 | 0 | 275 | 1,390 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\userland.c | C | 124 | 0 | 35 | 159 |
|
||||
| d:\Projects\C\cleonos\clks\lib\libc_compat.c | C | 25 | 0 | 7 | 32 |
|
||||
| d:\Projects\C\cleonos\clks\lib\string.c | C | 54 | 0 | 16 | 70 |
|
||||
| d:\Projects\C\cleonos\clks\rust\src\lib.rs | Rust | 21 | 0 | 6 | 27 |
|
||||
| d:\Projects\C\cleonos\cmake\check_tools.cmake | CMake | 34 | 0 | 7 | 41 |
|
||||
| d:\Projects\C\cleonos\cmake\gen_kernel_symbols.cmake | CMake | 80 | 0 | 26 | 106 |
|
||||
| d:\Projects\C\cleonos\cmake\log.cmake | CMake | 30 | 0 | 6 | 36 |
|
||||
| d:\Projects\C\cleonos\cmake\log_emit.cmake | CMake | 23 | 0 | 6 | 29 |
|
||||
| d:\Projects\C\cleonos\cmake\setup_limine.cmake | CMake | 100 | 0 | 19 | 119 |
|
||||
| d:\Projects\C\cleonos\configs\limine.conf | Properties | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\docs\README.md | Markdown | 31 | 0 | 4 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage1.md | Markdown | 41 | 0 | 5 | 46 |
|
||||
| d:\Projects\C\cleonos\docs\stage10.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage11.md | Markdown | 36 | 0 | 5 | 41 |
|
||||
| d:\Projects\C\cleonos\docs\stage12.md | Markdown | 40 | 0 | 6 | 46 |
|
||||
| d:\Projects\C\cleonos\docs\stage13.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage14.md | Markdown | 44 | 0 | 8 | 52 |
|
||||
| d:\Projects\C\cleonos\docs\stage15.md | Markdown | 47 | 0 | 7 | 54 |
|
||||
| d:\Projects\C\cleonos\docs\stage2.md | Markdown | 30 | 0 | 5 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage20.md | Markdown | 46 | 0 | 6 | 52 |
|
||||
| d:\Projects\C\cleonos\docs\stage21.md | Markdown | 72 | 0 | 7 | 79 |
|
||||
| d:\Projects\C\cleonos\docs\stage22.md | Markdown | 68 | 0 | 7 | 75 |
|
||||
| d:\Projects\C\cleonos\docs\stage23.md | Markdown | 41 | 0 | 6 | 47 |
|
||||
| d:\Projects\C\cleonos\docs\stage24.md | Markdown | 42 | 0 | 7 | 49 |
|
||||
| d:\Projects\C\cleonos\docs\stage25.md | Markdown | 58 | 0 | 7 | 65 |
|
||||
| d:\Projects\C\cleonos\docs\stage26.md | Markdown | 32 | 0 | 7 | 39 |
|
||||
| d:\Projects\C\cleonos\docs\stage27.md | Markdown | 32 | 0 | 7 | 39 |
|
||||
| d:\Projects\C\cleonos\docs\stage28.md | Markdown | 37 | 0 | 7 | 44 |
|
||||
| d:\Projects\C\cleonos\docs\stage29.md | Markdown | 33 | 0 | 7 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage3.md | Markdown | 29 | 0 | 5 | 34 |
|
||||
| d:\Projects\C\cleonos\docs\stage4.md | Markdown | 30 | 0 | 5 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage5.md | Markdown | 29 | 0 | 5 | 34 |
|
||||
| d:\Projects\C\cleonos\docs\stage6.md | Markdown | 30 | 0 | 6 | 36 |
|
||||
| d:\Projects\C\cleonos\docs\stage7.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage8.md | Markdown | 31 | 0 | 6 | 37 |
|
||||
| d:\Projects\C\cleonos\docs\stage9.md | Markdown | 31 | 0 | 6 | 37 |
|
||||
| d:\Projects\C\cleonos\docs\syscall.md | Markdown | 453 | 0 | 192 | 645 |
|
||||
| d:\Projects\C\cleonos\ramdisk\shell\init.cmd | Batch | 4 | 0 | 2 | 6 |
|
||||
| d:\Projects\C\cleonos\scripts\gen-tty-psf.ps1 | PowerShell | 171 | 2 | 42 | 215 |
|
||||
| d:\Projects\C\cleonos\wine\README.md | Markdown | 49 | 0 | 19 | 68 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine.py | Python | 3 | 1 | 3 | 7 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\__init__.py | Python | 4 | 0 | 1 | 5 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\cli.py | Python | 44 | 0 | 10 | 54 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\constants.py | Python | 76 | 1 | 11 | 88 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\input_pump.py | Python | 82 | 0 | 17 | 99 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\platform.py | Python | 55 | 0 | 5 | 60 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\runner.py | Python | 990 | 0 | 175 | 1,165 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\state.py | Python | 164 | 0 | 40 | 204 |
|
||||
| d:\Projects\C\cleonos\wine\requirements.txt | pip requirements | 1 | 0 | 1 | 2 |
|
||||
| Total | | 26,202 | 12 | 6,631 | 32,845 |
|
||||
+---------------------------------------------------------------+------------------+------------+------------+------------+------------+
|
||||
226
.VSCodeCounter/2026-04-18_19-50-42/details.md
Normal file
226
.VSCodeCounter/2026-04-18_19-50-42/details.md
Normal file
@@ -0,0 +1,226 @@
|
||||
# Details
|
||||
|
||||
Date : 2026-04-18 19:50:42
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 211 files, 30325 codes, 37 comments, 7514 blanks, all 37876 lines
|
||||
|
||||
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
|
||||
## Files
|
||||
| filename | language | code | comment | blank | total |
|
||||
| :--- | :--- | ---: | ---: | ---: | ---: |
|
||||
| [.github/workflows/build-os.yml](/.github/workflows/build-os.yml) | YAML | 76 | 1 | 11 | 88 |
|
||||
| [CMakeLists.txt](/CMakeLists.txt) | CMake | 776 | 0 | 98 | 874 |
|
||||
| [Makefile](/Makefile) | Makefile | 130 | 0 | 24 | 154 |
|
||||
| [README.md](/README.md) | Markdown | 92 | 0 | 34 | 126 |
|
||||
| [README.zh-CN.md](/README.zh-CN.md) | Markdown | 92 | 0 | 34 | 126 |
|
||||
| [cleonos/c/apps/ansi\_main.c](/cleonos/c/apps/ansi_main.c) | C | 43 | 0 | 11 | 54 |
|
||||
| [cleonos/c/apps/ansitest\_main.c](/cleonos/c/apps/ansitest_main.c) | C | 142 | 0 | 35 | 177 |
|
||||
| [cleonos/c/apps/append\_main.c](/cleonos/c/apps/append_main.c) | C | 74 | 0 | 18 | 92 |
|
||||
| [cleonos/c/apps/args\_main.c](/cleonos/c/apps/args_main.c) | C | 49 | 0 | 13 | 62 |
|
||||
| [cleonos/c/apps/bg\_main.c](/cleonos/c/apps/bg_main.c) | C | 101 | 0 | 26 | 127 |
|
||||
| [cleonos/c/apps/cat\_main.c](/cleonos/c/apps/cat_main.c) | C | 87 | 0 | 22 | 109 |
|
||||
| [cleonos/c/apps/cd\_main.c](/cleonos/c/apps/cd_main.c) | C | 54 | 0 | 15 | 69 |
|
||||
| [cleonos/c/apps/clear\_main.c](/cleonos/c/apps/clear_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/apps/cmd\_runtime.c](/cleonos/c/apps/cmd_runtime.c) | C | 464 | 0 | 139 | 603 |
|
||||
| [cleonos/c/apps/cmd\_runtime.h](/cleonos/c/apps/cmd_runtime.h) | C++ | 84 | 0 | 19 | 103 |
|
||||
| [cleonos/c/apps/cp\_main.c](/cleonos/c/apps/cp_main.c) | C | 111 | 0 | 25 | 136 |
|
||||
| [cleonos/c/apps/cut\_main.c](/cleonos/c/apps/cut_main.c) | C | 214 | 1 | 55 | 270 |
|
||||
| [cleonos/c/apps/dltest\_main.c](/cleonos/c/apps/dltest_main.c) | C | 38 | 0 | 11 | 49 |
|
||||
| [cleonos/c/apps/dmesg\_main.c](/cleonos/c/apps/dmesg_main.c) | C | 64 | 0 | 18 | 82 |
|
||||
| [cleonos/c/apps/elfrunner\_kmain.c](/cleonos/c/apps/elfrunner_kmain.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/elfrunner\_main.c](/cleonos/c/apps/elfrunner_main.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/exec\_main.c](/cleonos/c/apps/exec_main.c) | C | 87 | 0 | 22 | 109 |
|
||||
| [cleonos/c/apps/exit\_main.c](/cleonos/c/apps/exit_main.c) | C | 54 | 0 | 14 | 68 |
|
||||
| [cleonos/c/apps/fastfetch\_main.c](/cleonos/c/apps/fastfetch_main.c) | C | 180 | 0 | 34 | 214 |
|
||||
| [cleonos/c/apps/fg\_main.c](/cleonos/c/apps/fg_main.c) | C | 150 | 0 | 36 | 186 |
|
||||
| [cleonos/c/apps/fsstat\_main.c](/cleonos/c/apps/fsstat_main.c) | C | 46 | 0 | 11 | 57 |
|
||||
| [cleonos/c/apps/grep\_main.c](/cleonos/c/apps/grep_main.c) | C | 196 | 0 | 55 | 251 |
|
||||
| [cleonos/c/apps/head\_main.c](/cleonos/c/apps/head_main.c) | C | 165 | 0 | 47 | 212 |
|
||||
| [cleonos/c/apps/hello\_main.c](/cleonos/c/apps/hello_main.c) | C | 5 | 0 | 2 | 7 |
|
||||
| [cleonos/c/apps/help\_main.c](/cleonos/c/apps/help_main.c) | C | 80 | 0 | 10 | 90 |
|
||||
| [cleonos/c/apps/jobs\_main.c](/cleonos/c/apps/jobs_main.c) | C | 120 | 0 | 26 | 146 |
|
||||
| [cleonos/c/apps/kbdstat\_main.c](/cleonos/c/apps/kbdstat_main.c) | C | 44 | 0 | 11 | 55 |
|
||||
| [cleonos/c/apps/kdbg\_main.c](/cleonos/c/apps/kdbg_main.c) | C | 214 | 0 | 56 | 270 |
|
||||
| [cleonos/c/apps/kill\_main.c](/cleonos/c/apps/kill_main.c) | C | 144 | 0 | 39 | 183 |
|
||||
| [cleonos/c/apps/libctest\_main.c](/cleonos/c/apps/libctest_main.c) | C | 219 | 0 | 39 | 258 |
|
||||
| [cleonos/c/apps/libdemo\_main.c](/cleonos/c/apps/libdemo_main.c) | C | 19 | 0 | 6 | 25 |
|
||||
| [cleonos/c/apps/ls\_main.c](/cleonos/c/apps/ls_main.c) | C | 276 | 0 | 81 | 357 |
|
||||
| [cleonos/c/apps/memc\_kmain.c](/cleonos/c/apps/memc_kmain.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/memc\_main.c](/cleonos/c/apps/memc_main.c) | C | 8 | 0 | 3 | 11 |
|
||||
| [cleonos/c/apps/memstat\_main.c](/cleonos/c/apps/memstat_main.c) | C | 43 | 0 | 11 | 54 |
|
||||
| [cleonos/c/apps/mkdir\_main.c](/cleonos/c/apps/mkdir_main.c) | C | 57 | 0 | 16 | 73 |
|
||||
| [cleonos/c/apps/mv\_main.c](/cleonos/c/apps/mv_main.c) | C | 102 | 0 | 28 | 130 |
|
||||
| [cleonos/c/apps/pid\_main.c](/cleonos/c/apps/pid_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/apps/procstat\_main.c](/cleonos/c/apps/procstat_main.c) | C | 202 | 0 | 43 | 245 |
|
||||
| [cleonos/c/apps/ps\_main.c](/cleonos/c/apps/ps_main.c) | C | 160 | 0 | 35 | 195 |
|
||||
| [cleonos/c/apps/pwd\_main.c](/cleonos/c/apps/pwd_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/apps/restart\_main.c](/cleonos/c/apps/restart_main.c) | C | 40 | 0 | 11 | 51 |
|
||||
| [cleonos/c/apps/rm\_main.c](/cleonos/c/apps/rm_main.c) | C | 57 | 0 | 16 | 73 |
|
||||
| [cleonos/c/apps/shell/shell\_cmd.c](/cleonos/c/apps/shell/shell_cmd.c) | C | 2,534 | 0 | 637 | 3,171 |
|
||||
| [cleonos/c/apps/shell/shell\_external.c](/cleonos/c/apps/shell/shell_external.c) | C | 184 | 0 | 57 | 241 |
|
||||
| [cleonos/c/apps/shell/shell\_input.c](/cleonos/c/apps/shell/shell_input.c) | C | 567 | 0 | 149 | 716 |
|
||||
| [cleonos/c/apps/shell/shell\_internal.h](/cleonos/c/apps/shell/shell_internal.h) | C++ | 105 | 0 | 20 | 125 |
|
||||
| [cleonos/c/apps/shell/shell\_path.c](/cleonos/c/apps/shell/shell_path.c) | C | 153 | 0 | 50 | 203 |
|
||||
| [cleonos/c/apps/shell/shell\_script.c](/cleonos/c/apps/shell/shell_script.c) | C | 35 | 0 | 12 | 47 |
|
||||
| [cleonos/c/apps/shell/shell\_util.c](/cleonos/c/apps/shell/shell_util.c) | C | 263 | 0 | 77 | 340 |
|
||||
| [cleonos/c/apps/shell\_main.c](/cleonos/c/apps/shell_main.c) | C | 19 | 0 | 6 | 25 |
|
||||
| [cleonos/c/apps/shstat\_main.c](/cleonos/c/apps/shstat_main.c) | C | 45 | 0 | 11 | 56 |
|
||||
| [cleonos/c/apps/shutdown\_main.c](/cleonos/c/apps/shutdown_main.c) | C | 40 | 0 | 11 | 51 |
|
||||
| [cleonos/c/apps/sleep\_main.c](/cleonos/c/apps/sleep_main.c) | C | 52 | 0 | 14 | 66 |
|
||||
| [cleonos/c/apps/sort\_main.c](/cleonos/c/apps/sort_main.c) | C | 205 | 0 | 63 | 268 |
|
||||
| [cleonos/c/apps/spawn\_main.c](/cleonos/c/apps/spawn_main.c) | C | 76 | 0 | 20 | 96 |
|
||||
| [cleonos/c/apps/spin\_main.c](/cleonos/c/apps/spin_main.c) | C | 13 | 0 | 4 | 17 |
|
||||
| [cleonos/c/apps/stats\_main.c](/cleonos/c/apps/stats_main.c) | C | 103 | 0 | 17 | 120 |
|
||||
| [cleonos/c/apps/sysstat\_main.c](/cleonos/c/apps/sysstat_main.c) | C | 267 | 0 | 45 | 312 |
|
||||
| [cleonos/c/apps/tail\_main.c](/cleonos/c/apps/tail_main.c) | C | 191 | 0 | 54 | 245 |
|
||||
| [cleonos/c/apps/taskstat\_main.c](/cleonos/c/apps/taskstat_main.c) | C | 43 | 0 | 11 | 54 |
|
||||
| [cleonos/c/apps/top\_main.c](/cleonos/c/apps/top_main.c) | C | 194 | 0 | 45 | 239 |
|
||||
| [cleonos/c/apps/touch\_main.c](/cleonos/c/apps/touch_main.c) | C | 58 | 0 | 16 | 74 |
|
||||
| [cleonos/c/apps/tty\_main.c](/cleonos/c/apps/tty_main.c) | C | 64 | 0 | 17 | 81 |
|
||||
| [cleonos/c/apps/ttydrv\_main.c](/cleonos/c/apps/ttydrv_main.c) | C | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/apps/uniq\_main.c](/cleonos/c/apps/uniq_main.c) | C | 168 | 0 | 48 | 216 |
|
||||
| [cleonos/c/apps/userstat\_main.c](/cleonos/c/apps/userstat_main.c) | C | 48 | 0 | 11 | 59 |
|
||||
| [cleonos/c/apps/wait\_main.c](/cleonos/c/apps/wait_main.c) | C | 68 | 0 | 17 | 85 |
|
||||
| [cleonos/c/apps/wavplay\_main.c](/cleonos/c/apps/wavplay_main.c) | C | 455 | 0 | 110 | 565 |
|
||||
| [cleonos/c/apps/wc\_main.c](/cleonos/c/apps/wc_main.c) | C | 165 | 0 | 45 | 210 |
|
||||
| [cleonos/c/apps/write\_main.c](/cleonos/c/apps/write_main.c) | C | 74 | 0 | 18 | 92 |
|
||||
| [cleonos/c/apps/yield\_main.c](/cleonos/c/apps/yield_main.c) | C | 39 | 0 | 11 | 50 |
|
||||
| [cleonos/c/include/cleonos\_rust\_bridge.h](/cleonos/c/include/cleonos_rust_bridge.h) | C++ | 6 | 0 | 4 | 10 |
|
||||
| [cleonos/c/include/cleonos\_stdio.h](/cleonos/c/include/cleonos_stdio.h) | C++ | 4 | 0 | 3 | 7 |
|
||||
| [cleonos/c/include/cleonos\_syscall.h](/cleonos/c/include/cleonos_syscall.h) | C++ | 206 | 0 | 10 | 216 |
|
||||
| [cleonos/c/include/ctype.h](/cleonos/c/include/ctype.h) | C++ | 14 | 0 | 3 | 17 |
|
||||
| [cleonos/c/include/dlfcn.h](/cleonos/c/include/dlfcn.h) | C++ | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/include/stdio.h](/cleonos/c/include/stdio.h) | C++ | 21 | 0 | 7 | 28 |
|
||||
| [cleonos/c/include/stdlib.h](/cleonos/c/include/stdlib.h) | C++ | 27 | 0 | 10 | 37 |
|
||||
| [cleonos/c/include/string.h](/cleonos/c/include/string.h) | C++ | 25 | 0 | 5 | 30 |
|
||||
| [cleonos/c/src/dlfcn.c](/cleonos/c/src/dlfcn.c) | C | 33 | 0 | 16 | 49 |
|
||||
| [cleonos/c/src/libc\_ctype.c](/cleonos/c/src/libc_ctype.c) | C | 34 | 0 | 12 | 46 |
|
||||
| [cleonos/c/src/libc\_stdlib.c](/cleonos/c/src/libc_stdlib.c) | C | 198 | 0 | 57 | 255 |
|
||||
| [cleonos/c/src/libc\_string.c](/cleonos/c/src/libc_string.c) | C | 340 | 0 | 106 | 446 |
|
||||
| [cleonos/c/src/runtime.c](/cleonos/c/src/runtime.c) | C | 41 | 0 | 13 | 54 |
|
||||
| [cleonos/c/src/stdio.c](/cleonos/c/src/stdio.c) | C | 393 | 0 | 108 | 501 |
|
||||
| [cleonos/c/src/syscall.c](/cleonos/c/src/syscall.c) | C | 278 | 0 | 90 | 368 |
|
||||
| [cleonos/c/stub.c](/cleonos/c/stub.c) | C | 3 | 4 | 2 | 9 |
|
||||
| [cleonos/rust/src/lib.rs](/cleonos/rust/src/lib.rs) | Rust | 23 | 0 | 9 | 32 |
|
||||
| [clks/arch/aarch64/boot.c](/clks/arch/aarch64/boot.c) | C | 6 | 0 | 1 | 7 |
|
||||
| [clks/arch/x86\_64/boot.c](/clks/arch/x86_64/boot.c) | C | 6 | 0 | 1 | 7 |
|
||||
| [clks/arch/x86\_64/exec\_stack\_call.S](/clks/arch/x86_64/exec_stack_call.S) | Go Assembly | 40 | 0 | 8 | 48 |
|
||||
| [clks/arch/x86\_64/interrupt\_stubs.S](/clks/arch/x86_64/interrupt_stubs.S) | Go Assembly | 108 | 0 | 12 | 120 |
|
||||
| [clks/drivers/audio/pcspeaker.c](/clks/drivers/audio/pcspeaker.c) | C | 101 | 0 | 25 | 126 |
|
||||
| [clks/drivers/serial/serial.c](/clks/drivers/serial/serial.c) | C | 52 | 0 | 16 | 68 |
|
||||
| [clks/drivers/video/font8x8.c](/clks/drivers/video/font8x8.c) | C | 67 | 0 | 8 | 75 |
|
||||
| [clks/drivers/video/font8x8.h](/clks/drivers/video/font8x8.h) | C++ | 5 | 0 | 3 | 8 |
|
||||
| [clks/drivers/video/framebuffer.c](/clks/drivers/video/framebuffer.c) | C | 251 | 0 | 70 | 321 |
|
||||
| [clks/drivers/video/psf\_font.c](/clks/drivers/video/psf_font.c) | C | 230 | 0 | 56 | 286 |
|
||||
| [clks/drivers/video/psf\_font.h](/clks/drivers/video/psf_font.h) | C++ | 15 | 0 | 5 | 20 |
|
||||
| [clks/include/clks/audio.h](/clks/include/clks/audio.h) | C++ | 9 | 0 | 3 | 12 |
|
||||
| [clks/include/clks/boot.h](/clks/include/clks/boot.h) | C++ | 11 | 0 | 4 | 15 |
|
||||
| [clks/include/clks/compiler.h](/clks/include/clks/compiler.h) | C++ | 13 | 0 | 4 | 17 |
|
||||
| [clks/include/clks/cpu.h](/clks/include/clks/cpu.h) | C++ | 20 | 0 | 4 | 24 |
|
||||
| [clks/include/clks/desktop.h](/clks/include/clks/desktop.h) | C++ | 7 | 0 | 4 | 11 |
|
||||
| [clks/include/clks/driver.h](/clks/include/clks/driver.h) | C++ | 29 | 0 | 8 | 37 |
|
||||
| [clks/include/clks/elf64.h](/clks/include/clks/elf64.h) | C++ | 32 | 0 | 9 | 41 |
|
||||
| [clks/include/clks/elfrunner.h](/clks/include/clks/elfrunner.h) | C++ | 6 | 0 | 3 | 9 |
|
||||
| [clks/include/clks/exec.h](/clks/include/clks/exec.h) | C++ | 81 | 0 | 8 | 89 |
|
||||
| [clks/include/clks/framebuffer.h](/clks/include/clks/framebuffer.h) | C++ | 26 | 0 | 6 | 32 |
|
||||
| [clks/include/clks/fs.h](/clks/include/clks/fs.h) | C++ | 23 | 0 | 7 | 30 |
|
||||
| [clks/include/clks/heap.h](/clks/include/clks/heap.h) | C++ | 15 | 0 | 4 | 19 |
|
||||
| [clks/include/clks/interrupts.h](/clks/include/clks/interrupts.h) | C++ | 6 | 0 | 3 | 9 |
|
||||
| [clks/include/clks/kelf.h](/clks/include/clks/kelf.h) | C++ | 9 | 0 | 5 | 14 |
|
||||
| [clks/include/clks/kernel.h](/clks/include/clks/kernel.h) | C++ | 4 | 0 | 2 | 6 |
|
||||
| [clks/include/clks/keyboard.h](/clks/include/clks/keyboard.h) | C++ | 27 | 0 | 6 | 33 |
|
||||
| [clks/include/clks/limine.h](/clks/include/clks/limine.h) | C++ | 132 | 0 | 24 | 156 |
|
||||
| [clks/include/clks/log.h](/clks/include/clks/log.h) | C++ | 14 | 0 | 5 | 19 |
|
||||
| [clks/include/clks/mouse.h](/clks/include/clks/mouse.h) | C++ | 20 | 0 | 6 | 26 |
|
||||
| [clks/include/clks/panic.h](/clks/include/clks/panic.h) | C++ | 12 | 0 | 4 | 16 |
|
||||
| [clks/include/clks/pmm.h](/clks/include/clks/pmm.h) | C++ | 16 | 0 | 5 | 21 |
|
||||
| [clks/include/clks/ramdisk.h](/clks/include/clks/ramdisk.h) | C++ | 17 | 0 | 8 | 25 |
|
||||
| [clks/include/clks/scheduler.h](/clks/include/clks/scheduler.h) | C++ | 18 | 0 | 5 | 23 |
|
||||
| [clks/include/clks/serial.h](/clks/include/clks/serial.h) | C++ | 6 | 0 | 2 | 8 |
|
||||
| [clks/include/clks/service.h](/clks/include/clks/service.h) | C++ | 31 | 0 | 8 | 39 |
|
||||
| [clks/include/clks/shell.h](/clks/include/clks/shell.h) | C++ | 7 | 0 | 3 | 10 |
|
||||
| [clks/include/clks/string.h](/clks/include/clks/string.h) | C++ | 9 | 0 | 3 | 12 |
|
||||
| [clks/include/clks/syscall.h](/clks/include/clks/syscall.h) | C++ | 88 | 0 | 5 | 93 |
|
||||
| [clks/include/clks/task.h](/clks/include/clks/task.h) | C++ | 24 | 0 | 7 | 31 |
|
||||
| [clks/include/clks/tty.h](/clks/include/clks/tty.h) | C++ | 15 | 0 | 4 | 19 |
|
||||
| [clks/include/clks/types.h](/clks/include/clks/types.h) | C++ | 17 | 0 | 6 | 23 |
|
||||
| [clks/include/clks/userland.h](/clks/include/clks/userland.h) | C++ | 12 | 0 | 4 | 16 |
|
||||
| [clks/kernel/desktop.c](/clks/kernel/desktop.c) | C | 321 | 0 | 86 | 407 |
|
||||
| [clks/kernel/driver.c](/clks/kernel/driver.c) | C | 169 | 0 | 49 | 218 |
|
||||
| [clks/kernel/elf64.c](/clks/kernel/elf64.c) | C | 239 | 0 | 73 | 312 |
|
||||
| [clks/kernel/elfrunner.c](/clks/kernel/elfrunner.c) | C | 30 | 0 | 8 | 38 |
|
||||
| [clks/kernel/exec.c](/clks/kernel/exec.c) | C | 2,037 | 1 | 555 | 2,593 |
|
||||
| [clks/kernel/fs.c](/clks/kernel/fs.c) | C | 701 | 0 | 222 | 923 |
|
||||
| [clks/kernel/heap.c](/clks/kernel/heap.c) | C | 134 | 0 | 42 | 176 |
|
||||
| [clks/kernel/interrupts.c](/clks/kernel/interrupts.c) | C | 317 | 0 | 44 | 361 |
|
||||
| [clks/kernel/kelf.c](/clks/kernel/kelf.c) | C | 203 | 1 | 53 | 257 |
|
||||
| [clks/kernel/keyboard.c](/clks/kernel/keyboard.c) | C | 379 | 0 | 96 | 475 |
|
||||
| [clks/kernel/kmain.c](/clks/kernel/kmain.c) | C | 388 | 1 | 77 | 466 |
|
||||
| [clks/kernel/limine\_requests.c](/clks/kernel/limine_requests.c) | C | 76 | 0 | 26 | 102 |
|
||||
| [clks/kernel/log.c](/clks/kernel/log.c) | C | 185 | 0 | 48 | 233 |
|
||||
| [clks/kernel/mouse.c](/clks/kernel/mouse.c) | C | 246 | 0 | 63 | 309 |
|
||||
| [clks/kernel/panic.c](/clks/kernel/panic.c) | C | 546 | 0 | 155 | 701 |
|
||||
| [clks/kernel/pmm.c](/clks/kernel/pmm.c) | C | 82 | 0 | 23 | 105 |
|
||||
| [clks/kernel/ramdisk.c](/clks/kernel/ramdisk.c) | C | 172 | 0 | 50 | 222 |
|
||||
| [clks/kernel/scheduler.c](/clks/kernel/scheduler.c) | C | 136 | 0 | 44 | 180 |
|
||||
| [clks/kernel/service.c](/clks/kernel/service.c) | C | 113 | 0 | 34 | 147 |
|
||||
| [clks/kernel/shell.c](/clks/kernel/shell.c) | C | 1,250 | 0 | 317 | 1,567 |
|
||||
| [clks/kernel/syscall.c](/clks/kernel/syscall.c) | C | 1,588 | 0 | 401 | 1,989 |
|
||||
| [clks/kernel/tty.c](/clks/kernel/tty.c) | C | 1,188 | 0 | 290 | 1,478 |
|
||||
| [clks/kernel/userland.c](/clks/kernel/userland.c) | C | 145 | 0 | 38 | 183 |
|
||||
| [clks/lib/libc\_compat.c](/clks/lib/libc_compat.c) | C | 25 | 0 | 7 | 32 |
|
||||
| [clks/lib/string.c](/clks/lib/string.c) | C | 54 | 0 | 16 | 70 |
|
||||
| [clks/rust/src/lib.rs](/clks/rust/src/lib.rs) | Rust | 21 | 0 | 6 | 27 |
|
||||
| [cmake/check\_tools.cmake](/cmake/check_tools.cmake) | CMake | 34 | 0 | 7 | 41 |
|
||||
| [cmake/gen\_kernel\_symbols.cmake](/cmake/gen_kernel_symbols.cmake) | CMake | 80 | 0 | 26 | 106 |
|
||||
| [cmake/log.cmake](/cmake/log.cmake) | CMake | 30 | 0 | 6 | 36 |
|
||||
| [cmake/log\_emit.cmake](/cmake/log_emit.cmake) | CMake | 23 | 0 | 6 | 29 |
|
||||
| [cmake/setup\_limine.cmake](/cmake/setup_limine.cmake) | CMake | 100 | 0 | 19 | 119 |
|
||||
| [configs/limine.conf](/configs/limine.conf) | Properties | 6 | 0 | 1 | 7 |
|
||||
| [configs/menuconfig/clks\_features.json](/configs/menuconfig/clks_features.json) | JSON | 196 | 0 | 1 | 197 |
|
||||
| [docs/README.md](/docs/README.md) | Markdown | 31 | 0 | 4 | 35 |
|
||||
| [docs/stage1.md](/docs/stage1.md) | Markdown | 41 | 0 | 5 | 46 |
|
||||
| [docs/stage10.md](/docs/stage10.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage11.md](/docs/stage11.md) | Markdown | 36 | 0 | 5 | 41 |
|
||||
| [docs/stage12.md](/docs/stage12.md) | Markdown | 40 | 0 | 6 | 46 |
|
||||
| [docs/stage13.md](/docs/stage13.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage14.md](/docs/stage14.md) | Markdown | 44 | 0 | 8 | 52 |
|
||||
| [docs/stage15.md](/docs/stage15.md) | Markdown | 47 | 0 | 7 | 54 |
|
||||
| [docs/stage2.md](/docs/stage2.md) | Markdown | 30 | 0 | 5 | 35 |
|
||||
| [docs/stage20.md](/docs/stage20.md) | Markdown | 46 | 0 | 6 | 52 |
|
||||
| [docs/stage21.md](/docs/stage21.md) | Markdown | 72 | 0 | 7 | 79 |
|
||||
| [docs/stage22.md](/docs/stage22.md) | Markdown | 68 | 0 | 7 | 75 |
|
||||
| [docs/stage23.md](/docs/stage23.md) | Markdown | 41 | 0 | 6 | 47 |
|
||||
| [docs/stage24.md](/docs/stage24.md) | Markdown | 42 | 0 | 7 | 49 |
|
||||
| [docs/stage25.md](/docs/stage25.md) | Markdown | 58 | 0 | 7 | 65 |
|
||||
| [docs/stage26.md](/docs/stage26.md) | Markdown | 32 | 0 | 7 | 39 |
|
||||
| [docs/stage27.md](/docs/stage27.md) | Markdown | 32 | 0 | 7 | 39 |
|
||||
| [docs/stage28.md](/docs/stage28.md) | Markdown | 37 | 0 | 7 | 44 |
|
||||
| [docs/stage29.md](/docs/stage29.md) | Markdown | 33 | 0 | 7 | 40 |
|
||||
| [docs/stage3.md](/docs/stage3.md) | Markdown | 29 | 0 | 5 | 34 |
|
||||
| [docs/stage4.md](/docs/stage4.md) | Markdown | 30 | 0 | 5 | 35 |
|
||||
| [docs/stage5.md](/docs/stage5.md) | Markdown | 29 | 0 | 5 | 34 |
|
||||
| [docs/stage6.md](/docs/stage6.md) | Markdown | 30 | 0 | 6 | 36 |
|
||||
| [docs/stage7.md](/docs/stage7.md) | Markdown | 34 | 0 | 6 | 40 |
|
||||
| [docs/stage8.md](/docs/stage8.md) | Markdown | 31 | 0 | 6 | 37 |
|
||||
| [docs/stage9.md](/docs/stage9.md) | Markdown | 31 | 0 | 6 | 37 |
|
||||
| [docs/syscall.md](/docs/syscall.md) | Markdown | 453 | 0 | 192 | 645 |
|
||||
| [ramdisk/dev/random](/ramdisk/dev/random) | C++ | 0 | 0 | 1 | 1 |
|
||||
| [ramdisk/shell/init.cmd](/ramdisk/shell/init.cmd) | Batch | 4 | 0 | 2 | 6 |
|
||||
| [scripts/gen-tty-psf.ps1](/scripts/gen-tty-psf.ps1) | PowerShell | 171 | 2 | 42 | 215 |
|
||||
| [scripts/menuconfig.py](/scripts/menuconfig.py) | Python | 986 | 24 | 204 | 1,214 |
|
||||
| [wine/README.md](/wine/README.md) | Markdown | 49 | 0 | 19 | 68 |
|
||||
| [wine/cleonos\_wine.py](/wine/cleonos_wine.py) | Python | 3 | 1 | 3 | 7 |
|
||||
| [wine/cleonos\_wine\_lib/\_\_init\_\_.py](/wine/cleonos_wine_lib/__init__.py) | Python | 4 | 0 | 1 | 5 |
|
||||
| [wine/cleonos\_wine\_lib/cli.py](/wine/cleonos_wine_lib/cli.py) | Python | 44 | 0 | 10 | 54 |
|
||||
| [wine/cleonos\_wine\_lib/constants.py](/wine/cleonos_wine_lib/constants.py) | Python | 76 | 1 | 11 | 88 |
|
||||
| [wine/cleonos\_wine\_lib/input\_pump.py](/wine/cleonos_wine_lib/input_pump.py) | Python | 82 | 0 | 17 | 99 |
|
||||
| [wine/cleonos\_wine\_lib/platform.py](/wine/cleonos_wine_lib/platform.py) | Python | 55 | 0 | 5 | 60 |
|
||||
| [wine/cleonos\_wine\_lib/runner.py](/wine/cleonos_wine_lib/runner.py) | Python | 990 | 0 | 175 | 1,165 |
|
||||
| [wine/cleonos\_wine\_lib/state.py](/wine/cleonos_wine_lib/state.py) | Python | 164 | 0 | 40 | 204 |
|
||||
| [wine/requirements.txt](/wine/requirements.txt) | pip requirements | 1 | 0 | 1 | 2 |
|
||||
|
||||
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
68
.VSCodeCounter/2026-04-18_19-50-42/diff-details.md
Normal file
68
.VSCodeCounter/2026-04-18_19-50-42/diff-details.md
Normal file
@@ -0,0 +1,68 @@
|
||||
# Diff Details
|
||||
|
||||
Date : 2026-04-18 19:50:42
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 53 files, 4123 codes, 25 comments, 883 blanks, all 5031 lines
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
||||
|
||||
## Files
|
||||
| filename | language | code | comment | blank | total |
|
||||
| :--- | :--- | ---: | ---: | ---: | ---: |
|
||||
| [.github/workflows/build-os.yml](/.github/workflows/build-os.yml) | YAML | 28 | 1 | 1 | 30 |
|
||||
| [CMakeLists.txt](/CMakeLists.txt) | CMake | 161 | 0 | 10 | 171 |
|
||||
| [Makefile](/Makefile) | Makefile | 30 | 0 | 2 | 32 |
|
||||
| [cleonos/c/apps/cat\_main.c](/cleonos/c/apps/cat_main.c) | C | 4 | 0 | -2 | 2 |
|
||||
| [cleonos/c/apps/cmd\_runtime.c](/cleonos/c/apps/cmd_runtime.c) | C | 18 | 0 | -4 | 14 |
|
||||
| [cleonos/c/apps/cmd\_runtime.h](/cleonos/c/apps/cmd_runtime.h) | C++ | 4 | 0 | 0 | 4 |
|
||||
| [cleonos/c/apps/cp\_main.c](/cleonos/c/apps/cp_main.c) | C | 16 | 0 | -1 | 15 |
|
||||
| [cleonos/c/apps/dltest\_main.c](/cleonos/c/apps/dltest_main.c) | C | 38 | 0 | 11 | 49 |
|
||||
| [cleonos/c/apps/fsstat\_main.c](/cleonos/c/apps/fsstat_main.c) | C | 1 | 0 | 0 | 1 |
|
||||
| [cleonos/c/apps/grep\_main.c](/cleonos/c/apps/grep_main.c) | C | 1 | 0 | 1 | 2 |
|
||||
| [cleonos/c/apps/head\_main.c](/cleonos/c/apps/head_main.c) | C | 1 | 0 | 0 | 1 |
|
||||
| [cleonos/c/apps/hello\_main.c](/cleonos/c/apps/hello_main.c) | C | -1 | 0 | 0 | -1 |
|
||||
| [cleonos/c/apps/libctest\_main.c](/cleonos/c/apps/libctest_main.c) | C | 219 | 0 | 39 | 258 |
|
||||
| [cleonos/c/apps/libdemo\_main.c](/cleonos/c/apps/libdemo_main.c) | C | 19 | 0 | 6 | 25 |
|
||||
| [cleonos/c/apps/ls\_main.c](/cleonos/c/apps/ls_main.c) | C | 14 | 0 | 5 | 19 |
|
||||
| [cleonos/c/apps/shell/shell\_cmd.c](/cleonos/c/apps/shell/shell_cmd.c) | C | 219 | 0 | 63 | 282 |
|
||||
| [cleonos/c/apps/shell/shell\_external.c](/cleonos/c/apps/shell/shell_external.c) | C | 18 | 0 | 2 | 20 |
|
||||
| [cleonos/c/apps/shell/shell\_input.c](/cleonos/c/apps/shell/shell_input.c) | C | 4 | 0 | 2 | 6 |
|
||||
| [cleonos/c/apps/shell/shell\_internal.h](/cleonos/c/apps/shell/shell_internal.h) | C++ | 13 | 0 | 0 | 13 |
|
||||
| [cleonos/c/apps/shell/shell\_util.c](/cleonos/c/apps/shell/shell_util.c) | C | -20 | 0 | -9 | -29 |
|
||||
| [cleonos/c/apps/stats\_main.c](/cleonos/c/apps/stats_main.c) | C | 1 | 0 | 0 | 1 |
|
||||
| [cleonos/c/apps/tail\_main.c](/cleonos/c/apps/tail_main.c) | C | 1 | 0 | 0 | 1 |
|
||||
| [cleonos/c/apps/top\_main.c](/cleonos/c/apps/top_main.c) | C | -1 | 0 | -2 | -3 |
|
||||
| [cleonos/c/apps/wavplay\_main.c](/cleonos/c/apps/wavplay_main.c) | C | 59 | 0 | 11 | 70 |
|
||||
| [cleonos/c/apps/wc\_main.c](/cleonos/c/apps/wc_main.c) | C | 1 | 0 | 0 | 1 |
|
||||
| [cleonos/c/include/cleonos\_stdio.h](/cleonos/c/include/cleonos_stdio.h) | C++ | 4 | 0 | 3 | 7 |
|
||||
| [cleonos/c/include/cleonos\_syscall.h](/cleonos/c/include/cleonos_syscall.h) | C++ | 14 | 0 | 0 | 14 |
|
||||
| [cleonos/c/include/ctype.h](/cleonos/c/include/ctype.h) | C++ | 14 | 0 | 3 | 17 |
|
||||
| [cleonos/c/include/dlfcn.h](/cleonos/c/include/dlfcn.h) | C++ | 6 | 0 | 3 | 9 |
|
||||
| [cleonos/c/include/stdio.h](/cleonos/c/include/stdio.h) | C++ | 21 | 0 | 7 | 28 |
|
||||
| [cleonos/c/include/stdlib.h](/cleonos/c/include/stdlib.h) | C++ | 27 | 0 | 10 | 37 |
|
||||
| [cleonos/c/include/string.h](/cleonos/c/include/string.h) | C++ | 25 | 0 | 5 | 30 |
|
||||
| [cleonos/c/src/dlfcn.c](/cleonos/c/src/dlfcn.c) | C | 33 | 0 | 16 | 49 |
|
||||
| [cleonos/c/src/libc\_ctype.c](/cleonos/c/src/libc_ctype.c) | C | 34 | 0 | 12 | 46 |
|
||||
| [cleonos/c/src/libc\_stdlib.c](/cleonos/c/src/libc_stdlib.c) | C | 198 | 0 | 57 | 255 |
|
||||
| [cleonos/c/src/libc\_string.c](/cleonos/c/src/libc_string.c) | C | 340 | 0 | 106 | 446 |
|
||||
| [cleonos/c/src/runtime.c](/cleonos/c/src/runtime.c) | C | 4 | 0 | 1 | 5 |
|
||||
| [cleonos/c/src/stdio.c](/cleonos/c/src/stdio.c) | C | 393 | 0 | 108 | 501 |
|
||||
| [cleonos/c/src/syscall.c](/cleonos/c/src/syscall.c) | C | 28 | 0 | 7 | 35 |
|
||||
| [clks/include/clks/exec.h](/clks/include/clks/exec.h) | C++ | 10 | 0 | 0 | 10 |
|
||||
| [clks/include/clks/syscall.h](/clks/include/clks/syscall.h) | C++ | 4 | 0 | 0 | 4 |
|
||||
| [clks/include/clks/tty.h](/clks/include/clks/tty.h) | C++ | 1 | 0 | 0 | 1 |
|
||||
| [clks/kernel/exec.c](/clks/kernel/exec.c) | C | 515 | 0 | 120 | 635 |
|
||||
| [clks/kernel/fs.c](/clks/kernel/fs.c) | C | 3 | 0 | 2 | 5 |
|
||||
| [clks/kernel/keyboard.c](/clks/kernel/keyboard.c) | C | 28 | 0 | 8 | 36 |
|
||||
| [clks/kernel/kmain.c](/clks/kernel/kmain.c) | C | 188 | 0 | 25 | 213 |
|
||||
| [clks/kernel/shell.c](/clks/kernel/shell.c) | C | 1 | 0 | 0 | 1 |
|
||||
| [clks/kernel/syscall.c](/clks/kernel/syscall.c) | C | 108 | 0 | 31 | 139 |
|
||||
| [clks/kernel/tty.c](/clks/kernel/tty.c) | C | 73 | 0 | 15 | 88 |
|
||||
| [clks/kernel/userland.c](/clks/kernel/userland.c) | C | 21 | 0 | 3 | 24 |
|
||||
| [configs/menuconfig/clks\_features.json](/configs/menuconfig/clks_features.json) | JSON | 196 | 0 | 1 | 197 |
|
||||
| [ramdisk/dev/random](/ramdisk/dev/random) | C++ | 0 | 0 | 1 | 1 |
|
||||
| [scripts/menuconfig.py](/scripts/menuconfig.py) | Python | 986 | 24 | 204 | 1,214 |
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
||||
55
.VSCodeCounter/2026-04-18_19-50-42/diff.csv
Normal file
55
.VSCodeCounter/2026-04-18_19-50-42/diff.csv
Normal file
@@ -0,0 +1,55 @@
|
||||
"filename", "language", "YAML", "CMake", "Makefile", "C", "C++", "JSON", "Python", "comment", "blank", "total"
|
||||
"d:\Projects\C\cleonos\.github\workflows\build-os.yml", "YAML", 28, 0, 0, 0, 0, 0, 0, 1, 1, 30
|
||||
"d:\Projects\C\cleonos\CMakeLists.txt", "CMake", 0, 161, 0, 0, 0, 0, 0, 0, 10, 171
|
||||
"d:\Projects\C\cleonos\Makefile", "Makefile", 0, 0, 30, 0, 0, 0, 0, 0, 2, 32
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cat_main.c", "C", 0, 0, 0, 4, 0, 0, 0, 0, -2, 2
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.c", "C", 0, 0, 0, 18, 0, 0, 0, 0, -4, 14
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.h", "C++", 0, 0, 0, 0, 4, 0, 0, 0, 0, 4
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cp_main.c", "C", 0, 0, 0, 16, 0, 0, 0, 0, -1, 15
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\dltest_main.c", "C", 0, 0, 0, 38, 0, 0, 0, 0, 11, 49
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fsstat_main.c", "C", 0, 0, 0, 1, 0, 0, 0, 0, 0, 1
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\grep_main.c", "C", 0, 0, 0, 1, 0, 0, 0, 0, 1, 2
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\head_main.c", "C", 0, 0, 0, 1, 0, 0, 0, 0, 0, 1
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\hello_main.c", "C", 0, 0, 0, -1, 0, 0, 0, 0, 0, -1
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\libctest_main.c", "C", 0, 0, 0, 219, 0, 0, 0, 0, 39, 258
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\libdemo_main.c", "C", 0, 0, 0, 19, 0, 0, 0, 0, 6, 25
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ls_main.c", "C", 0, 0, 0, 14, 0, 0, 0, 0, 5, 19
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c", "C", 0, 0, 0, 219, 0, 0, 0, 0, 63, 282
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_external.c", "C", 0, 0, 0, 18, 0, 0, 0, 0, 2, 20
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c", "C", 0, 0, 0, 4, 0, 0, 0, 0, 2, 6
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_internal.h", "C++", 0, 0, 0, 0, 13, 0, 0, 0, 0, 13
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_util.c", "C", 0, 0, 0, -20, 0, 0, 0, 0, -9, -29
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\stats_main.c", "C", 0, 0, 0, 1, 0, 0, 0, 0, 0, 1
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\tail_main.c", "C", 0, 0, 0, 1, 0, 0, 0, 0, 0, 1
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\top_main.c", "C", 0, 0, 0, -1, 0, 0, 0, 0, -2, -3
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wavplay_main.c", "C", 0, 0, 0, 59, 0, 0, 0, 0, 11, 70
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wc_main.c", "C", 0, 0, 0, 1, 0, 0, 0, 0, 0, 1
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_stdio.h", "C++", 0, 0, 0, 0, 4, 0, 0, 0, 3, 7
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h", "C++", 0, 0, 0, 0, 14, 0, 0, 0, 0, 14
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\ctype.h", "C++", 0, 0, 0, 0, 14, 0, 0, 0, 3, 17
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\dlfcn.h", "C++", 0, 0, 0, 0, 6, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\stdio.h", "C++", 0, 0, 0, 0, 21, 0, 0, 0, 7, 28
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\stdlib.h", "C++", 0, 0, 0, 0, 27, 0, 0, 0, 10, 37
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\string.h", "C++", 0, 0, 0, 0, 25, 0, 0, 0, 5, 30
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\dlfcn.c", "C", 0, 0, 0, 33, 0, 0, 0, 0, 16, 49
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\libc_ctype.c", "C", 0, 0, 0, 34, 0, 0, 0, 0, 12, 46
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\libc_stdlib.c", "C", 0, 0, 0, 198, 0, 0, 0, 0, 57, 255
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\libc_string.c", "C", 0, 0, 0, 340, 0, 0, 0, 0, 106, 446
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\runtime.c", "C", 0, 0, 0, 4, 0, 0, 0, 0, 1, 5
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\stdio.c", "C", 0, 0, 0, 393, 0, 0, 0, 0, 108, 501
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\syscall.c", "C", 0, 0, 0, 28, 0, 0, 0, 0, 7, 35
|
||||
"d:\Projects\C\cleonos\clks\include\clks\exec.h", "C++", 0, 0, 0, 0, 10, 0, 0, 0, 0, 10
|
||||
"d:\Projects\C\cleonos\clks\include\clks\syscall.h", "C++", 0, 0, 0, 0, 4, 0, 0, 0, 0, 4
|
||||
"d:\Projects\C\cleonos\clks\include\clks\tty.h", "C++", 0, 0, 0, 0, 1, 0, 0, 0, 0, 1
|
||||
"d:\Projects\C\cleonos\clks\kernel\exec.c", "C", 0, 0, 0, 515, 0, 0, 0, 0, 120, 635
|
||||
"d:\Projects\C\cleonos\clks\kernel\fs.c", "C", 0, 0, 0, 3, 0, 0, 0, 0, 2, 5
|
||||
"d:\Projects\C\cleonos\clks\kernel\keyboard.c", "C", 0, 0, 0, 28, 0, 0, 0, 0, 8, 36
|
||||
"d:\Projects\C\cleonos\clks\kernel\kmain.c", "C", 0, 0, 0, 188, 0, 0, 0, 0, 25, 213
|
||||
"d:\Projects\C\cleonos\clks\kernel\shell.c", "C", 0, 0, 0, 1, 0, 0, 0, 0, 0, 1
|
||||
"d:\Projects\C\cleonos\clks\kernel\syscall.c", "C", 0, 0, 0, 108, 0, 0, 0, 0, 31, 139
|
||||
"d:\Projects\C\cleonos\clks\kernel\tty.c", "C", 0, 0, 0, 73, 0, 0, 0, 0, 15, 88
|
||||
"d:\Projects\C\cleonos\clks\kernel\userland.c", "C", 0, 0, 0, 21, 0, 0, 0, 0, 3, 24
|
||||
"d:\Projects\C\cleonos\configs\menuconfig\clks_features.json", "JSON", 0, 0, 0, 0, 0, 196, 0, 0, 1, 197
|
||||
"d:\Projects\C\cleonos\ramdisk\dev\random", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 1, 1
|
||||
"d:\Projects\C\cleonos\scripts\menuconfig.py", "Python", 0, 0, 0, 0, 0, 0, 986, 24, 204, 1214
|
||||
"Total", "-", 28, 161, 30, 2579, 143, 196, 986, 25, 883, 5031
|
||||
|
46
.VSCodeCounter/2026-04-18_19-50-42/diff.md
Normal file
46
.VSCodeCounter/2026-04-18_19-50-42/diff.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Diff Summary
|
||||
|
||||
Date : 2026-04-18 19:50:42
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 53 files, 4123 codes, 25 comments, 883 blanks, all 5031 lines
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
||||
|
||||
## Languages
|
||||
| language | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| C | 35 | 2,579 | 0 | 633 | 3,212 |
|
||||
| Python | 1 | 986 | 24 | 204 | 1,214 |
|
||||
| JSON | 1 | 196 | 0 | 1 | 197 |
|
||||
| CMake | 1 | 161 | 0 | 10 | 171 |
|
||||
| C++ | 13 | 143 | 0 | 32 | 175 |
|
||||
| Makefile | 1 | 30 | 0 | 2 | 32 |
|
||||
| YAML | 1 | 28 | 1 | 1 | 30 |
|
||||
|
||||
## Directories
|
||||
| path | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| . | 53 | 4,123 | 25 | 883 | 5,031 |
|
||||
| . (Files) | 2 | 191 | 0 | 12 | 203 |
|
||||
| .github | 1 | 28 | 1 | 1 | 30 |
|
||||
| .github\\workflows | 1 | 28 | 1 | 1 | 30 |
|
||||
| cleonos | 36 | 1,770 | 0 | 460 | 2,230 |
|
||||
| cleonos\\c | 36 | 1,770 | 0 | 460 | 2,230 |
|
||||
| cleonos\\c\\apps | 22 | 629 | 0 | 122 | 751 |
|
||||
| cleonos\\c\\apps (Files) | 17 | 395 | 0 | 64 | 459 |
|
||||
| cleonos\\c\\apps\\shell | 5 | 234 | 0 | 58 | 292 |
|
||||
| cleonos\\c\\include | 7 | 111 | 0 | 31 | 142 |
|
||||
| cleonos\\c\\src | 7 | 1,030 | 0 | 307 | 1,337 |
|
||||
| clks | 11 | 952 | 0 | 204 | 1,156 |
|
||||
| clks\\include | 3 | 15 | 0 | 0 | 15 |
|
||||
| clks\\include\\clks | 3 | 15 | 0 | 0 | 15 |
|
||||
| clks\\kernel | 8 | 937 | 0 | 204 | 1,141 |
|
||||
| configs | 1 | 196 | 0 | 1 | 197 |
|
||||
| configs\\menuconfig | 1 | 196 | 0 | 1 | 197 |
|
||||
| ramdisk | 1 | 0 | 0 | 1 | 1 |
|
||||
| ramdisk\\dev | 1 | 0 | 0 | 1 | 1 |
|
||||
| scripts | 1 | 986 | 24 | 204 | 1,214 |
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
||||
102
.VSCodeCounter/2026-04-18_19-50-42/diff.txt
Normal file
102
.VSCodeCounter/2026-04-18_19-50-42/diff.txt
Normal file
@@ -0,0 +1,102 @@
|
||||
Date : 2026-04-18 19:50:42
|
||||
Directory : d:\Projects\C\cleonos
|
||||
Total : 53 files, 4123 codes, 25 comments, 883 blanks, all 5031 lines
|
||||
|
||||
Languages
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
| language | files | code | comment | blank | total |
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
| C | 35 | 2,579 | 0 | 633 | 3,212 |
|
||||
| Python | 1 | 986 | 24 | 204 | 1,214 |
|
||||
| JSON | 1 | 196 | 0 | 1 | 197 |
|
||||
| CMake | 1 | 161 | 0 | 10 | 171 |
|
||||
| C++ | 13 | 143 | 0 | 32 | 175 |
|
||||
| Makefile | 1 | 30 | 0 | 2 | 32 |
|
||||
| YAML | 1 | 28 | 1 | 1 | 30 |
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
|
||||
Directories
|
||||
+-------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| path | files | code | comment | blank | total |
|
||||
+-------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| . | 53 | 4,123 | 25 | 883 | 5,031 |
|
||||
| . (Files) | 2 | 191 | 0 | 12 | 203 |
|
||||
| .github | 1 | 28 | 1 | 1 | 30 |
|
||||
| .github\workflows | 1 | 28 | 1 | 1 | 30 |
|
||||
| cleonos | 36 | 1,770 | 0 | 460 | 2,230 |
|
||||
| cleonos\c | 36 | 1,770 | 0 | 460 | 2,230 |
|
||||
| cleonos\c\apps | 22 | 629 | 0 | 122 | 751 |
|
||||
| cleonos\c\apps (Files) | 17 | 395 | 0 | 64 | 459 |
|
||||
| cleonos\c\apps\shell | 5 | 234 | 0 | 58 | 292 |
|
||||
| cleonos\c\include | 7 | 111 | 0 | 31 | 142 |
|
||||
| cleonos\c\src | 7 | 1,030 | 0 | 307 | 1,337 |
|
||||
| clks | 11 | 952 | 0 | 204 | 1,156 |
|
||||
| clks\include | 3 | 15 | 0 | 0 | 15 |
|
||||
| clks\include\clks | 3 | 15 | 0 | 0 | 15 |
|
||||
| clks\kernel | 8 | 937 | 0 | 204 | 1,141 |
|
||||
| configs | 1 | 196 | 0 | 1 | 197 |
|
||||
| configs\menuconfig | 1 | 196 | 0 | 1 | 197 |
|
||||
| ramdisk | 1 | 0 | 0 | 1 | 1 |
|
||||
| ramdisk\dev | 1 | 0 | 0 | 1 | 1 |
|
||||
| scripts | 1 | 986 | 24 | 204 | 1,214 |
|
||||
+-------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Files
|
||||
+-------------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
| filename | language | code | comment | blank | total |
|
||||
+-------------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
| d:\Projects\C\cleonos\.github\workflows\build-os.yml | YAML | 28 | 1 | 1 | 30 |
|
||||
| d:\Projects\C\cleonos\CMakeLists.txt | CMake | 161 | 0 | 10 | 171 |
|
||||
| d:\Projects\C\cleonos\Makefile | Makefile | 30 | 0 | 2 | 32 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cat_main.c | C | 4 | 0 | -2 | 2 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.c | C | 18 | 0 | -4 | 14 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.h | C++ | 4 | 0 | 0 | 4 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cp_main.c | C | 16 | 0 | -1 | 15 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\dltest_main.c | C | 38 | 0 | 11 | 49 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fsstat_main.c | C | 1 | 0 | 0 | 1 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\grep_main.c | C | 1 | 0 | 1 | 2 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\head_main.c | C | 1 | 0 | 0 | 1 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\hello_main.c | C | -1 | 0 | 0 | -1 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\libctest_main.c | C | 219 | 0 | 39 | 258 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\libdemo_main.c | C | 19 | 0 | 6 | 25 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ls_main.c | C | 14 | 0 | 5 | 19 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c | C | 219 | 0 | 63 | 282 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_external.c | C | 18 | 0 | 2 | 20 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c | C | 4 | 0 | 2 | 6 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_internal.h | C++ | 13 | 0 | 0 | 13 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_util.c | C | -20 | 0 | -9 | -29 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\stats_main.c | C | 1 | 0 | 0 | 1 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\tail_main.c | C | 1 | 0 | 0 | 1 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\top_main.c | C | -1 | 0 | -2 | -3 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wavplay_main.c | C | 59 | 0 | 11 | 70 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wc_main.c | C | 1 | 0 | 0 | 1 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_stdio.h | C++ | 4 | 0 | 3 | 7 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h | C++ | 14 | 0 | 0 | 14 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\ctype.h | C++ | 14 | 0 | 3 | 17 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\dlfcn.h | C++ | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\stdio.h | C++ | 21 | 0 | 7 | 28 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\stdlib.h | C++ | 27 | 0 | 10 | 37 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\string.h | C++ | 25 | 0 | 5 | 30 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\dlfcn.c | C | 33 | 0 | 16 | 49 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\libc_ctype.c | C | 34 | 0 | 12 | 46 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\libc_stdlib.c | C | 198 | 0 | 57 | 255 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\libc_string.c | C | 340 | 0 | 106 | 446 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\runtime.c | C | 4 | 0 | 1 | 5 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\stdio.c | C | 393 | 0 | 108 | 501 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\syscall.c | C | 28 | 0 | 7 | 35 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\exec.h | C++ | 10 | 0 | 0 | 10 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\syscall.h | C++ | 4 | 0 | 0 | 4 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\tty.h | C++ | 1 | 0 | 0 | 1 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\exec.c | C | 515 | 0 | 120 | 635 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\fs.c | C | 3 | 0 | 2 | 5 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\keyboard.c | C | 28 | 0 | 8 | 36 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\kmain.c | C | 188 | 0 | 25 | 213 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\shell.c | C | 1 | 0 | 0 | 1 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\syscall.c | C | 108 | 0 | 31 | 139 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\tty.c | C | 73 | 0 | 15 | 88 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\userland.c | C | 21 | 0 | 3 | 24 |
|
||||
| d:\Projects\C\cleonos\configs\menuconfig\clks_features.json | JSON | 196 | 0 | 1 | 197 |
|
||||
| d:\Projects\C\cleonos\ramdisk\dev\random | C++ | 0 | 0 | 1 | 1 |
|
||||
| d:\Projects\C\cleonos\scripts\menuconfig.py | Python | 986 | 24 | 204 | 1,214 |
|
||||
| Total | | 4,123 | 25 | 883 | 5,031 |
|
||||
+-------------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
213
.VSCodeCounter/2026-04-18_19-50-42/results.csv
Normal file
213
.VSCodeCounter/2026-04-18_19-50-42/results.csv
Normal file
@@ -0,0 +1,213 @@
|
||||
"filename", "language", "Python", "YAML", "Markdown", "Rust", "CMake", "pip requirements", "C", "Makefile", "C++", "JSON", "Properties", "PowerShell", "Batch", "Go Assembly", "comment", "blank", "total"
|
||||
"d:\Projects\C\cleonos\.github\workflows\build-os.yml", "YAML", 0, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 11, 88
|
||||
"d:\Projects\C\cleonos\CMakeLists.txt", "CMake", 0, 0, 0, 0, 776, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 874
|
||||
"d:\Projects\C\cleonos\Makefile", "Makefile", 0, 0, 0, 0, 0, 0, 0, 130, 0, 0, 0, 0, 0, 0, 0, 24, 154
|
||||
"d:\Projects\C\cleonos\README.md", "Markdown", 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 126
|
||||
"d:\Projects\C\cleonos\README.zh-CN.md", "Markdown", 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 126
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ansi_main.c", "C", 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 11, 54
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ansitest_main.c", "C", 0, 0, 0, 0, 0, 0, 142, 0, 0, 0, 0, 0, 0, 0, 0, 35, 177
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\append_main.c", "C", 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 18, 92
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\args_main.c", "C", 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 13, 62
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\bg_main.c", "C", 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 26, 127
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cat_main.c", "C", 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 22, 109
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cd_main.c", "C", 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 15, 69
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\clear_main.c", "C", 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.c", "C", 0, 0, 0, 0, 0, 0, 464, 0, 0, 0, 0, 0, 0, 0, 0, 139, 603
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 19, 103
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cp_main.c", "C", 0, 0, 0, 0, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 25, 136
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\cut_main.c", "C", 0, 0, 0, 0, 0, 0, 214, 0, 0, 0, 0, 0, 0, 0, 1, 55, 270
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\dltest_main.c", "C", 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 11, 49
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\dmesg_main.c", "C", 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 18, 82
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_kmain.c", "C", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_main.c", "C", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\exec_main.c", "C", 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 22, 109
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\exit_main.c", "C", 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 14, 68
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fastfetch_main.c", "C", 0, 0, 0, 0, 0, 0, 180, 0, 0, 0, 0, 0, 0, 0, 0, 34, 214
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fg_main.c", "C", 0, 0, 0, 0, 0, 0, 150, 0, 0, 0, 0, 0, 0, 0, 0, 36, 186
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\fsstat_main.c", "C", 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 11, 57
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\grep_main.c", "C", 0, 0, 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, 0, 0, 0, 55, 251
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\head_main.c", "C", 0, 0, 0, 0, 0, 0, 165, 0, 0, 0, 0, 0, 0, 0, 0, 47, 212
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\hello_main.c", "C", 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 2, 7
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\help_main.c", "C", 0, 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 10, 90
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\jobs_main.c", "C", 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 26, 146
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\kbdstat_main.c", "C", 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 11, 55
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\kdbg_main.c", "C", 0, 0, 0, 0, 0, 0, 214, 0, 0, 0, 0, 0, 0, 0, 0, 56, 270
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\kill_main.c", "C", 0, 0, 0, 0, 0, 0, 144, 0, 0, 0, 0, 0, 0, 0, 0, 39, 183
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\libctest_main.c", "C", 0, 0, 0, 0, 0, 0, 219, 0, 0, 0, 0, 0, 0, 0, 0, 39, 258
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\libdemo_main.c", "C", 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 6, 25
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ls_main.c", "C", 0, 0, 0, 0, 0, 0, 276, 0, 0, 0, 0, 0, 0, 0, 0, 81, 357
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memc_kmain.c", "C", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memc_main.c", "C", 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 3, 11
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\memstat_main.c", "C", 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 11, 54
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\mkdir_main.c", "C", 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, 16, 73
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\mv_main.c", "C", 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 0, 0, 0, 28, 130
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\pid_main.c", "C", 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\procstat_main.c", "C", 0, 0, 0, 0, 0, 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, 43, 245
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ps_main.c", "C", 0, 0, 0, 0, 0, 0, 160, 0, 0, 0, 0, 0, 0, 0, 0, 35, 195
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\pwd_main.c", "C", 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\restart_main.c", "C", 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 11, 51
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\rm_main.c", "C", 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, 16, 73
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c", "C", 0, 0, 0, 0, 0, 0, 2534, 0, 0, 0, 0, 0, 0, 0, 0, 637, 3171
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_external.c", "C", 0, 0, 0, 0, 0, 0, 184, 0, 0, 0, 0, 0, 0, 0, 0, 57, 241
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c", "C", 0, 0, 0, 0, 0, 0, 567, 0, 0, 0, 0, 0, 0, 0, 0, 149, 716
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_internal.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 105, 0, 0, 0, 0, 0, 0, 20, 125
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_path.c", "C", 0, 0, 0, 0, 0, 0, 153, 0, 0, 0, 0, 0, 0, 0, 0, 50, 203
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_script.c", "C", 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 12, 47
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_util.c", "C", 0, 0, 0, 0, 0, 0, 263, 0, 0, 0, 0, 0, 0, 0, 0, 77, 340
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shell_main.c", "C", 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 6, 25
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shstat_main.c", "C", 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 11, 56
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\shutdown_main.c", "C", 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 11, 51
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\sleep_main.c", "C", 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 14, 66
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\sort_main.c", "C", 0, 0, 0, 0, 0, 0, 205, 0, 0, 0, 0, 0, 0, 0, 0, 63, 268
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\spawn_main.c", "C", 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 0, 20, 96
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\spin_main.c", "C", 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 4, 17
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\stats_main.c", "C", 0, 0, 0, 0, 0, 0, 103, 0, 0, 0, 0, 0, 0, 0, 0, 17, 120
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\sysstat_main.c", "C", 0, 0, 0, 0, 0, 0, 267, 0, 0, 0, 0, 0, 0, 0, 0, 45, 312
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\tail_main.c", "C", 0, 0, 0, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0, 0, 0, 54, 245
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\taskstat_main.c", "C", 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 11, 54
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\top_main.c", "C", 0, 0, 0, 0, 0, 0, 194, 0, 0, 0, 0, 0, 0, 0, 0, 45, 239
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\touch_main.c", "C", 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 16, 74
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\tty_main.c", "C", 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 17, 81
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\ttydrv_main.c", "C", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\uniq_main.c", "C", 0, 0, 0, 0, 0, 0, 168, 0, 0, 0, 0, 0, 0, 0, 0, 48, 216
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\userstat_main.c", "C", 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 11, 59
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wait_main.c", "C", 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 17, 85
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wavplay_main.c", "C", 0, 0, 0, 0, 0, 0, 455, 0, 0, 0, 0, 0, 0, 0, 0, 110, 565
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\wc_main.c", "C", 0, 0, 0, 0, 0, 0, 165, 0, 0, 0, 0, 0, 0, 0, 0, 45, 210
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\write_main.c", "C", 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 18, 92
|
||||
"d:\Projects\C\cleonos\cleonos\c\apps\yield_main.c", "C", 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 11, 50
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_rust_bridge.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 4, 10
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_stdio.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 3, 7
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 206, 0, 0, 0, 0, 0, 0, 10, 216
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\ctype.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 3, 17
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\dlfcn.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\stdio.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 7, 28
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\stdlib.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 10, 37
|
||||
"d:\Projects\C\cleonos\cleonos\c\include\string.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 5, 30
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\dlfcn.c", "C", 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 16, 49
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\libc_ctype.c", "C", 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 12, 46
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\libc_stdlib.c", "C", 0, 0, 0, 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, 0, 0, 57, 255
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\libc_string.c", "C", 0, 0, 0, 0, 0, 0, 340, 0, 0, 0, 0, 0, 0, 0, 0, 106, 446
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\runtime.c", "C", 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 13, 54
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\stdio.c", "C", 0, 0, 0, 0, 0, 0, 393, 0, 0, 0, 0, 0, 0, 0, 0, 108, 501
|
||||
"d:\Projects\C\cleonos\cleonos\c\src\syscall.c", "C", 0, 0, 0, 0, 0, 0, 278, 0, 0, 0, 0, 0, 0, 0, 0, 90, 368
|
||||
"d:\Projects\C\cleonos\cleonos\c\stub.c", "C", 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 2, 9
|
||||
"d:\Projects\C\cleonos\cleonos\rust\src\lib.rs", "Rust", 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 32
|
||||
"d:\Projects\C\cleonos\clks\arch\aarch64\boot.c", "C", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\boot.c", "C", 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\exec_stack_call.S", "Go Assembly", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 8, 48
|
||||
"d:\Projects\C\cleonos\clks\arch\x86_64\interrupt_stubs.S", "Go Assembly", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 0, 12, 120
|
||||
"d:\Projects\C\cleonos\clks\drivers\audio\pcspeaker.c", "C", 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 25, 126
|
||||
"d:\Projects\C\cleonos\clks\drivers\serial\serial.c", "C", 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 16, 68
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\font8x8.c", "C", 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, 0, 8, 75
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\font8x8.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 3, 8
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\framebuffer.c", "C", 0, 0, 0, 0, 0, 0, 251, 0, 0, 0, 0, 0, 0, 0, 0, 70, 321
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\psf_font.c", "C", 0, 0, 0, 0, 0, 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 56, 286
|
||||
"d:\Projects\C\cleonos\clks\drivers\video\psf_font.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 5, 20
|
||||
"d:\Projects\C\cleonos\clks\include\clks\audio.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 3, 12
|
||||
"d:\Projects\C\cleonos\clks\include\clks\boot.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 4, 15
|
||||
"d:\Projects\C\cleonos\clks\include\clks\compiler.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 4, 17
|
||||
"d:\Projects\C\cleonos\clks\include\clks\cpu.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 4, 24
|
||||
"d:\Projects\C\cleonos\clks\include\clks\desktop.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 4, 11
|
||||
"d:\Projects\C\cleonos\clks\include\clks\driver.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 8, 37
|
||||
"d:\Projects\C\cleonos\clks\include\clks\elf64.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 9, 41
|
||||
"d:\Projects\C\cleonos\clks\include\clks\elfrunner.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\clks\include\clks\exec.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 8, 89
|
||||
"d:\Projects\C\cleonos\clks\include\clks\framebuffer.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 6, 32
|
||||
"d:\Projects\C\cleonos\clks\include\clks\fs.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 7, 30
|
||||
"d:\Projects\C\cleonos\clks\include\clks\heap.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 4, 19
|
||||
"d:\Projects\C\cleonos\clks\include\clks\interrupts.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 3, 9
|
||||
"d:\Projects\C\cleonos\clks\include\clks\kelf.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 5, 14
|
||||
"d:\Projects\C\cleonos\clks\include\clks\kernel.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 2, 6
|
||||
"d:\Projects\C\cleonos\clks\include\clks\keyboard.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 6, 33
|
||||
"d:\Projects\C\cleonos\clks\include\clks\limine.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 132, 0, 0, 0, 0, 0, 0, 24, 156
|
||||
"d:\Projects\C\cleonos\clks\include\clks\log.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 5, 19
|
||||
"d:\Projects\C\cleonos\clks\include\clks\mouse.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 6, 26
|
||||
"d:\Projects\C\cleonos\clks\include\clks\panic.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 4, 16
|
||||
"d:\Projects\C\cleonos\clks\include\clks\pmm.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 5, 21
|
||||
"d:\Projects\C\cleonos\clks\include\clks\ramdisk.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 8, 25
|
||||
"d:\Projects\C\cleonos\clks\include\clks\scheduler.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 5, 23
|
||||
"d:\Projects\C\cleonos\clks\include\clks\serial.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 2, 8
|
||||
"d:\Projects\C\cleonos\clks\include\clks\service.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 8, 39
|
||||
"d:\Projects\C\cleonos\clks\include\clks\shell.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 3, 10
|
||||
"d:\Projects\C\cleonos\clks\include\clks\string.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 3, 12
|
||||
"d:\Projects\C\cleonos\clks\include\clks\syscall.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 5, 93
|
||||
"d:\Projects\C\cleonos\clks\include\clks\task.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 7, 31
|
||||
"d:\Projects\C\cleonos\clks\include\clks\tty.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 4, 19
|
||||
"d:\Projects\C\cleonos\clks\include\clks\types.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 6, 23
|
||||
"d:\Projects\C\cleonos\clks\include\clks\userland.h", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 4, 16
|
||||
"d:\Projects\C\cleonos\clks\kernel\desktop.c", "C", 0, 0, 0, 0, 0, 0, 321, 0, 0, 0, 0, 0, 0, 0, 0, 86, 407
|
||||
"d:\Projects\C\cleonos\clks\kernel\driver.c", "C", 0, 0, 0, 0, 0, 0, 169, 0, 0, 0, 0, 0, 0, 0, 0, 49, 218
|
||||
"d:\Projects\C\cleonos\clks\kernel\elf64.c", "C", 0, 0, 0, 0, 0, 0, 239, 0, 0, 0, 0, 0, 0, 0, 0, 73, 312
|
||||
"d:\Projects\C\cleonos\clks\kernel\elfrunner.c", "C", 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 8, 38
|
||||
"d:\Projects\C\cleonos\clks\kernel\exec.c", "C", 0, 0, 0, 0, 0, 0, 2037, 0, 0, 0, 0, 0, 0, 0, 1, 555, 2593
|
||||
"d:\Projects\C\cleonos\clks\kernel\fs.c", "C", 0, 0, 0, 0, 0, 0, 701, 0, 0, 0, 0, 0, 0, 0, 0, 222, 923
|
||||
"d:\Projects\C\cleonos\clks\kernel\heap.c", "C", 0, 0, 0, 0, 0, 0, 134, 0, 0, 0, 0, 0, 0, 0, 0, 42, 176
|
||||
"d:\Projects\C\cleonos\clks\kernel\interrupts.c", "C", 0, 0, 0, 0, 0, 0, 317, 0, 0, 0, 0, 0, 0, 0, 0, 44, 361
|
||||
"d:\Projects\C\cleonos\clks\kernel\kelf.c", "C", 0, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 0, 1, 53, 257
|
||||
"d:\Projects\C\cleonos\clks\kernel\keyboard.c", "C", 0, 0, 0, 0, 0, 0, 379, 0, 0, 0, 0, 0, 0, 0, 0, 96, 475
|
||||
"d:\Projects\C\cleonos\clks\kernel\kmain.c", "C", 0, 0, 0, 0, 0, 0, 388, 0, 0, 0, 0, 0, 0, 0, 1, 77, 466
|
||||
"d:\Projects\C\cleonos\clks\kernel\limine_requests.c", "C", 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 0, 26, 102
|
||||
"d:\Projects\C\cleonos\clks\kernel\log.c", "C", 0, 0, 0, 0, 0, 0, 185, 0, 0, 0, 0, 0, 0, 0, 0, 48, 233
|
||||
"d:\Projects\C\cleonos\clks\kernel\mouse.c", "C", 0, 0, 0, 0, 0, 0, 246, 0, 0, 0, 0, 0, 0, 0, 0, 63, 309
|
||||
"d:\Projects\C\cleonos\clks\kernel\panic.c", "C", 0, 0, 0, 0, 0, 0, 546, 0, 0, 0, 0, 0, 0, 0, 0, 155, 701
|
||||
"d:\Projects\C\cleonos\clks\kernel\pmm.c", "C", 0, 0, 0, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 23, 105
|
||||
"d:\Projects\C\cleonos\clks\kernel\ramdisk.c", "C", 0, 0, 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 0, 0, 50, 222
|
||||
"d:\Projects\C\cleonos\clks\kernel\scheduler.c", "C", 0, 0, 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, 0, 0, 0, 44, 180
|
||||
"d:\Projects\C\cleonos\clks\kernel\service.c", "C", 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 34, 147
|
||||
"d:\Projects\C\cleonos\clks\kernel\shell.c", "C", 0, 0, 0, 0, 0, 0, 1250, 0, 0, 0, 0, 0, 0, 0, 0, 317, 1567
|
||||
"d:\Projects\C\cleonos\clks\kernel\syscall.c", "C", 0, 0, 0, 0, 0, 0, 1588, 0, 0, 0, 0, 0, 0, 0, 0, 401, 1989
|
||||
"d:\Projects\C\cleonos\clks\kernel\tty.c", "C", 0, 0, 0, 0, 0, 0, 1188, 0, 0, 0, 0, 0, 0, 0, 0, 290, 1478
|
||||
"d:\Projects\C\cleonos\clks\kernel\userland.c", "C", 0, 0, 0, 0, 0, 0, 145, 0, 0, 0, 0, 0, 0, 0, 0, 38, 183
|
||||
"d:\Projects\C\cleonos\clks\lib\libc_compat.c", "C", 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 7, 32
|
||||
"d:\Projects\C\cleonos\clks\lib\string.c", "C", 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 16, 70
|
||||
"d:\Projects\C\cleonos\clks\rust\src\lib.rs", "Rust", 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 27
|
||||
"d:\Projects\C\cleonos\cmake\check_tools.cmake", "CMake", 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 41
|
||||
"d:\Projects\C\cleonos\cmake\gen_kernel_symbols.cmake", "CMake", 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 106
|
||||
"d:\Projects\C\cleonos\cmake\log.cmake", "CMake", 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 36
|
||||
"d:\Projects\C\cleonos\cmake\log_emit.cmake", "CMake", 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 29
|
||||
"d:\Projects\C\cleonos\cmake\setup_limine.cmake", "CMake", 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 119
|
||||
"d:\Projects\C\cleonos\configs\limine.conf", "Properties", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 1, 7
|
||||
"d:\Projects\C\cleonos\configs\menuconfig\clks_features.json", "JSON", 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, 1, 197
|
||||
"d:\Projects\C\cleonos\docs\README.md", "Markdown", 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 35
|
||||
"d:\Projects\C\cleonos\docs\stage1.md", "Markdown", 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 46
|
||||
"d:\Projects\C\cleonos\docs\stage10.md", "Markdown", 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage11.md", "Markdown", 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 41
|
||||
"d:\Projects\C\cleonos\docs\stage12.md", "Markdown", 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 46
|
||||
"d:\Projects\C\cleonos\docs\stage13.md", "Markdown", 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage14.md", "Markdown", 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 52
|
||||
"d:\Projects\C\cleonos\docs\stage15.md", "Markdown", 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 54
|
||||
"d:\Projects\C\cleonos\docs\stage2.md", "Markdown", 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 35
|
||||
"d:\Projects\C\cleonos\docs\stage20.md", "Markdown", 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 52
|
||||
"d:\Projects\C\cleonos\docs\stage21.md", "Markdown", 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 79
|
||||
"d:\Projects\C\cleonos\docs\stage22.md", "Markdown", 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 75
|
||||
"d:\Projects\C\cleonos\docs\stage23.md", "Markdown", 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 47
|
||||
"d:\Projects\C\cleonos\docs\stage24.md", "Markdown", 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 49
|
||||
"d:\Projects\C\cleonos\docs\stage25.md", "Markdown", 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 65
|
||||
"d:\Projects\C\cleonos\docs\stage26.md", "Markdown", 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 39
|
||||
"d:\Projects\C\cleonos\docs\stage27.md", "Markdown", 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 39
|
||||
"d:\Projects\C\cleonos\docs\stage28.md", "Markdown", 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 44
|
||||
"d:\Projects\C\cleonos\docs\stage29.md", "Markdown", 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 40
|
||||
"d:\Projects\C\cleonos\docs\stage3.md", "Markdown", 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 34
|
||||
"d:\Projects\C\cleonos\docs\stage4.md", "Markdown", 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 35
|
||||
"d:\Projects\C\cleonos\docs\stage5.md", "Markdown", 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 34
|
||||
"d:\Projects\C\cleonos\docs\stage6.md", "Markdown", 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 36
|
||||
"d:\Projects\C\cleonos\docs\stage7.md", "Markdown", 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 40
|
||||
"d:\Projects\C\cleonos\docs\stage8.md", "Markdown", 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 37
|
||||
"d:\Projects\C\cleonos\docs\stage9.md", "Markdown", 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 37
|
||||
"d:\Projects\C\cleonos\docs\syscall.md", "Markdown", 0, 0, 453, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 645
|
||||
"d:\Projects\C\cleonos\ramdisk\dev\random", "C++", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1
|
||||
"d:\Projects\C\cleonos\ramdisk\shell\init.cmd", "Batch", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 2, 6
|
||||
"d:\Projects\C\cleonos\scripts\gen-tty-psf.ps1", "PowerShell", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 0, 0, 2, 42, 215
|
||||
"d:\Projects\C\cleonos\scripts\menuconfig.py", "Python", 986, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 204, 1214
|
||||
"d:\Projects\C\cleonos\wine\README.md", "Markdown", 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 68
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine.py", "Python", 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 7
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\__init__.py", "Python", 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\cli.py", "Python", 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 54
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\constants.py", "Python", 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 11, 88
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\input_pump.py", "Python", 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 99
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\platform.py", "Python", 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 60
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\runner.py", "Python", 990, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 1165
|
||||
"d:\Projects\C\cleonos\wine\cleonos_wine_lib\state.py", "Python", 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 204
|
||||
"d:\Projects\C\cleonos\wine\requirements.txt", "pip requirements", 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2
|
||||
"Total", "-", 2404, 76, 1698, 44, 1043, 1, 23130, 130, 1274, 196, 6, 171, 4, 148, 37, 7514, 37876
|
||||
|
1
.VSCodeCounter/2026-04-18_19-50-42/results.json
Normal file
1
.VSCodeCounter/2026-04-18_19-50-42/results.json
Normal file
File diff suppressed because one or more lines are too long
73
.VSCodeCounter/2026-04-18_19-50-42/results.md
Normal file
73
.VSCodeCounter/2026-04-18_19-50-42/results.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# Summary
|
||||
|
||||
Date : 2026-04-18 19:50:42
|
||||
|
||||
Directory d:\\Projects\\C\\cleonos
|
||||
|
||||
Total : 211 files, 30325 codes, 37 comments, 7514 blanks, all 37876 lines
|
||||
|
||||
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
|
||||
## Languages
|
||||
| language | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| C | 110 | 23,130 | 8 | 6,059 | 29,197 |
|
||||
| Python | 9 | 2,404 | 26 | 466 | 2,896 |
|
||||
| Markdown | 30 | 1,698 | 0 | 438 | 2,136 |
|
||||
| C++ | 45 | 1,274 | 0 | 272 | 1,546 |
|
||||
| CMake | 6 | 1,043 | 0 | 162 | 1,205 |
|
||||
| JSON | 1 | 196 | 0 | 1 | 197 |
|
||||
| PowerShell | 1 | 171 | 2 | 42 | 215 |
|
||||
| Go Assembly | 2 | 148 | 0 | 20 | 168 |
|
||||
| Makefile | 1 | 130 | 0 | 24 | 154 |
|
||||
| YAML | 1 | 76 | 1 | 11 | 88 |
|
||||
| Rust | 2 | 44 | 0 | 15 | 59 |
|
||||
| Properties | 1 | 6 | 0 | 1 | 7 |
|
||||
| Batch | 1 | 4 | 0 | 2 | 6 |
|
||||
| pip requirements | 1 | 1 | 0 | 1 | 2 |
|
||||
|
||||
## Directories
|
||||
| path | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| . | 211 | 30,325 | 37 | 7,514 | 37,876 |
|
||||
| . (Files) | 4 | 1,090 | 0 | 190 | 1,280 |
|
||||
| .github | 1 | 76 | 1 | 11 | 88 |
|
||||
| .github\\workflows | 1 | 76 | 1 | 11 | 88 |
|
||||
| cleonos | 89 | 12,214 | 5 | 3,158 | 15,377 |
|
||||
| cleonos\\c | 88 | 12,191 | 5 | 3,149 | 15,345 |
|
||||
| cleonos\\c (Files) | 1 | 3 | 4 | 2 | 9 |
|
||||
| cleonos\\c\\apps | 72 | 10,562 | 1 | 2,700 | 13,263 |
|
||||
| cleonos\\c\\apps (Files) | 65 | 6,721 | 1 | 1,698 | 8,420 |
|
||||
| cleonos\\c\\apps\\shell | 7 | 3,841 | 0 | 1,002 | 4,843 |
|
||||
| cleonos\\c\\include | 8 | 309 | 0 | 45 | 354 |
|
||||
| cleonos\\c\\src | 7 | 1,317 | 0 | 402 | 1,719 |
|
||||
| cleonos\\rust | 1 | 23 | 0 | 9 | 32 |
|
||||
| cleonos\\rust\\src | 1 | 23 | 0 | 9 | 32 |
|
||||
| clks | 69 | 12,382 | 3 | 3,207 | 15,592 |
|
||||
| clks\\arch | 4 | 160 | 0 | 22 | 182 |
|
||||
| clks\\arch\\aarch64 | 1 | 6 | 0 | 1 | 7 |
|
||||
| clks\\arch\\x86_64 | 3 | 154 | 0 | 21 | 175 |
|
||||
| clks\\drivers | 7 | 721 | 0 | 183 | 904 |
|
||||
| clks\\drivers\\audio | 1 | 101 | 0 | 25 | 126 |
|
||||
| clks\\drivers\\serial | 1 | 52 | 0 | 16 | 68 |
|
||||
| clks\\drivers\\video | 5 | 568 | 0 | 142 | 710 |
|
||||
| clks\\include | 32 | 756 | 0 | 179 | 935 |
|
||||
| clks\\include\\clks | 32 | 756 | 0 | 179 | 935 |
|
||||
| clks\\kernel | 23 | 10,645 | 3 | 2,794 | 13,442 |
|
||||
| clks\\lib | 2 | 79 | 0 | 23 | 102 |
|
||||
| clks\\rust | 1 | 21 | 0 | 6 | 27 |
|
||||
| clks\\rust\\src | 1 | 21 | 0 | 6 | 27 |
|
||||
| cmake | 5 | 267 | 0 | 64 | 331 |
|
||||
| configs | 2 | 202 | 0 | 2 | 204 |
|
||||
| configs (Files) | 1 | 6 | 0 | 1 | 7 |
|
||||
| configs\\menuconfig | 1 | 196 | 0 | 1 | 197 |
|
||||
| docs | 27 | 1,465 | 0 | 351 | 1,816 |
|
||||
| ramdisk | 2 | 4 | 0 | 3 | 7 |
|
||||
| ramdisk\\dev | 1 | 0 | 0 | 1 | 1 |
|
||||
| ramdisk\\shell | 1 | 4 | 0 | 2 | 6 |
|
||||
| scripts | 2 | 1,157 | 26 | 246 | 1,429 |
|
||||
| wine | 10 | 1,468 | 2 | 282 | 1,752 |
|
||||
| wine (Files) | 3 | 53 | 1 | 23 | 77 |
|
||||
| wine\\cleonos_wine_lib | 7 | 1,415 | 1 | 259 | 1,675 |
|
||||
|
||||
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
287
.VSCodeCounter/2026-04-18_19-50-42/results.txt
Normal file
287
.VSCodeCounter/2026-04-18_19-50-42/results.txt
Normal file
@@ -0,0 +1,287 @@
|
||||
Date : 2026-04-18 19:50:42
|
||||
Directory : d:\Projects\C\cleonos
|
||||
Total : 211 files, 30325 codes, 37 comments, 7514 blanks, all 37876 lines
|
||||
|
||||
Languages
|
||||
+------------------+------------+------------+------------+------------+------------+
|
||||
| language | files | code | comment | blank | total |
|
||||
+------------------+------------+------------+------------+------------+------------+
|
||||
| C | 110 | 23,130 | 8 | 6,059 | 29,197 |
|
||||
| Python | 9 | 2,404 | 26 | 466 | 2,896 |
|
||||
| Markdown | 30 | 1,698 | 0 | 438 | 2,136 |
|
||||
| C++ | 45 | 1,274 | 0 | 272 | 1,546 |
|
||||
| CMake | 6 | 1,043 | 0 | 162 | 1,205 |
|
||||
| JSON | 1 | 196 | 0 | 1 | 197 |
|
||||
| PowerShell | 1 | 171 | 2 | 42 | 215 |
|
||||
| Go Assembly | 2 | 148 | 0 | 20 | 168 |
|
||||
| Makefile | 1 | 130 | 0 | 24 | 154 |
|
||||
| YAML | 1 | 76 | 1 | 11 | 88 |
|
||||
| Rust | 2 | 44 | 0 | 15 | 59 |
|
||||
| Properties | 1 | 6 | 0 | 1 | 7 |
|
||||
| Batch | 1 | 4 | 0 | 2 | 6 |
|
||||
| pip requirements | 1 | 1 | 0 | 1 | 2 |
|
||||
+------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Directories
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| path | files | code | comment | blank | total |
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| . | 211 | 30,325 | 37 | 7,514 | 37,876 |
|
||||
| . (Files) | 4 | 1,090 | 0 | 190 | 1,280 |
|
||||
| .github | 1 | 76 | 1 | 11 | 88 |
|
||||
| .github\workflows | 1 | 76 | 1 | 11 | 88 |
|
||||
| cleonos | 89 | 12,214 | 5 | 3,158 | 15,377 |
|
||||
| cleonos\c | 88 | 12,191 | 5 | 3,149 | 15,345 |
|
||||
| cleonos\c (Files) | 1 | 3 | 4 | 2 | 9 |
|
||||
| cleonos\c\apps | 72 | 10,562 | 1 | 2,700 | 13,263 |
|
||||
| cleonos\c\apps (Files) | 65 | 6,721 | 1 | 1,698 | 8,420 |
|
||||
| cleonos\c\apps\shell | 7 | 3,841 | 0 | 1,002 | 4,843 |
|
||||
| cleonos\c\include | 8 | 309 | 0 | 45 | 354 |
|
||||
| cleonos\c\src | 7 | 1,317 | 0 | 402 | 1,719 |
|
||||
| cleonos\rust | 1 | 23 | 0 | 9 | 32 |
|
||||
| cleonos\rust\src | 1 | 23 | 0 | 9 | 32 |
|
||||
| clks | 69 | 12,382 | 3 | 3,207 | 15,592 |
|
||||
| clks\arch | 4 | 160 | 0 | 22 | 182 |
|
||||
| clks\arch\aarch64 | 1 | 6 | 0 | 1 | 7 |
|
||||
| clks\arch\x86_64 | 3 | 154 | 0 | 21 | 175 |
|
||||
| clks\drivers | 7 | 721 | 0 | 183 | 904 |
|
||||
| clks\drivers\audio | 1 | 101 | 0 | 25 | 126 |
|
||||
| clks\drivers\serial | 1 | 52 | 0 | 16 | 68 |
|
||||
| clks\drivers\video | 5 | 568 | 0 | 142 | 710 |
|
||||
| clks\include | 32 | 756 | 0 | 179 | 935 |
|
||||
| clks\include\clks | 32 | 756 | 0 | 179 | 935 |
|
||||
| clks\kernel | 23 | 10,645 | 3 | 2,794 | 13,442 |
|
||||
| clks\lib | 2 | 79 | 0 | 23 | 102 |
|
||||
| clks\rust | 1 | 21 | 0 | 6 | 27 |
|
||||
| clks\rust\src | 1 | 21 | 0 | 6 | 27 |
|
||||
| cmake | 5 | 267 | 0 | 64 | 331 |
|
||||
| configs | 2 | 202 | 0 | 2 | 204 |
|
||||
| configs (Files) | 1 | 6 | 0 | 1 | 7 |
|
||||
| configs\menuconfig | 1 | 196 | 0 | 1 | 197 |
|
||||
| docs | 27 | 1,465 | 0 | 351 | 1,816 |
|
||||
| ramdisk | 2 | 4 | 0 | 3 | 7 |
|
||||
| ramdisk\dev | 1 | 0 | 0 | 1 | 1 |
|
||||
| ramdisk\shell | 1 | 4 | 0 | 2 | 6 |
|
||||
| scripts | 2 | 1,157 | 26 | 246 | 1,429 |
|
||||
| wine | 10 | 1,468 | 2 | 282 | 1,752 |
|
||||
| wine (Files) | 3 | 53 | 1 | 23 | 77 |
|
||||
| wine\cleonos_wine_lib | 7 | 1,415 | 1 | 259 | 1,675 |
|
||||
+---------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Files
|
||||
+---------------------------------------------------------------+------------------+------------+------------+------------+------------+
|
||||
| filename | language | code | comment | blank | total |
|
||||
+---------------------------------------------------------------+------------------+------------+------------+------------+------------+
|
||||
| d:\Projects\C\cleonos\.github\workflows\build-os.yml | YAML | 76 | 1 | 11 | 88 |
|
||||
| d:\Projects\C\cleonos\CMakeLists.txt | CMake | 776 | 0 | 98 | 874 |
|
||||
| d:\Projects\C\cleonos\Makefile | Makefile | 130 | 0 | 24 | 154 |
|
||||
| d:\Projects\C\cleonos\README.md | Markdown | 92 | 0 | 34 | 126 |
|
||||
| d:\Projects\C\cleonos\README.zh-CN.md | Markdown | 92 | 0 | 34 | 126 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ansi_main.c | C | 43 | 0 | 11 | 54 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ansitest_main.c | C | 142 | 0 | 35 | 177 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\append_main.c | C | 74 | 0 | 18 | 92 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\args_main.c | C | 49 | 0 | 13 | 62 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\bg_main.c | C | 101 | 0 | 26 | 127 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cat_main.c | C | 87 | 0 | 22 | 109 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cd_main.c | C | 54 | 0 | 15 | 69 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\clear_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.c | C | 464 | 0 | 139 | 603 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cmd_runtime.h | C++ | 84 | 0 | 19 | 103 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cp_main.c | C | 111 | 0 | 25 | 136 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\cut_main.c | C | 214 | 1 | 55 | 270 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\dltest_main.c | C | 38 | 0 | 11 | 49 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\dmesg_main.c | C | 64 | 0 | 18 | 82 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_kmain.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\elfrunner_main.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\exec_main.c | C | 87 | 0 | 22 | 109 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\exit_main.c | C | 54 | 0 | 14 | 68 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fastfetch_main.c | C | 180 | 0 | 34 | 214 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fg_main.c | C | 150 | 0 | 36 | 186 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\fsstat_main.c | C | 46 | 0 | 11 | 57 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\grep_main.c | C | 196 | 0 | 55 | 251 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\head_main.c | C | 165 | 0 | 47 | 212 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\hello_main.c | C | 5 | 0 | 2 | 7 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\help_main.c | C | 80 | 0 | 10 | 90 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\jobs_main.c | C | 120 | 0 | 26 | 146 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\kbdstat_main.c | C | 44 | 0 | 11 | 55 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\kdbg_main.c | C | 214 | 0 | 56 | 270 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\kill_main.c | C | 144 | 0 | 39 | 183 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\libctest_main.c | C | 219 | 0 | 39 | 258 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\libdemo_main.c | C | 19 | 0 | 6 | 25 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ls_main.c | C | 276 | 0 | 81 | 357 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memc_kmain.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memc_main.c | C | 8 | 0 | 3 | 11 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\memstat_main.c | C | 43 | 0 | 11 | 54 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\mkdir_main.c | C | 57 | 0 | 16 | 73 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\mv_main.c | C | 102 | 0 | 28 | 130 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\pid_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\procstat_main.c | C | 202 | 0 | 43 | 245 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ps_main.c | C | 160 | 0 | 35 | 195 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\pwd_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\restart_main.c | C | 40 | 0 | 11 | 51 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\rm_main.c | C | 57 | 0 | 16 | 73 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_cmd.c | C | 2,534 | 0 | 637 | 3,171 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_external.c | C | 184 | 0 | 57 | 241 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_input.c | C | 567 | 0 | 149 | 716 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_internal.h | C++ | 105 | 0 | 20 | 125 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_path.c | C | 153 | 0 | 50 | 203 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_script.c | C | 35 | 0 | 12 | 47 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell\shell_util.c | C | 263 | 0 | 77 | 340 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shell_main.c | C | 19 | 0 | 6 | 25 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shstat_main.c | C | 45 | 0 | 11 | 56 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\shutdown_main.c | C | 40 | 0 | 11 | 51 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\sleep_main.c | C | 52 | 0 | 14 | 66 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\sort_main.c | C | 205 | 0 | 63 | 268 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\spawn_main.c | C | 76 | 0 | 20 | 96 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\spin_main.c | C | 13 | 0 | 4 | 17 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\stats_main.c | C | 103 | 0 | 17 | 120 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\sysstat_main.c | C | 267 | 0 | 45 | 312 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\tail_main.c | C | 191 | 0 | 54 | 245 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\taskstat_main.c | C | 43 | 0 | 11 | 54 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\top_main.c | C | 194 | 0 | 45 | 239 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\touch_main.c | C | 58 | 0 | 16 | 74 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\tty_main.c | C | 64 | 0 | 17 | 81 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\ttydrv_main.c | C | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\uniq_main.c | C | 168 | 0 | 48 | 216 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\userstat_main.c | C | 48 | 0 | 11 | 59 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wait_main.c | C | 68 | 0 | 17 | 85 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wavplay_main.c | C | 455 | 0 | 110 | 565 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\wc_main.c | C | 165 | 0 | 45 | 210 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\write_main.c | C | 74 | 0 | 18 | 92 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\apps\yield_main.c | C | 39 | 0 | 11 | 50 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_rust_bridge.h | C++ | 6 | 0 | 4 | 10 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_stdio.h | C++ | 4 | 0 | 3 | 7 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\cleonos_syscall.h | C++ | 206 | 0 | 10 | 216 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\ctype.h | C++ | 14 | 0 | 3 | 17 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\dlfcn.h | C++ | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\stdio.h | C++ | 21 | 0 | 7 | 28 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\stdlib.h | C++ | 27 | 0 | 10 | 37 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\include\string.h | C++ | 25 | 0 | 5 | 30 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\dlfcn.c | C | 33 | 0 | 16 | 49 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\libc_ctype.c | C | 34 | 0 | 12 | 46 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\libc_stdlib.c | C | 198 | 0 | 57 | 255 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\libc_string.c | C | 340 | 0 | 106 | 446 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\runtime.c | C | 41 | 0 | 13 | 54 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\stdio.c | C | 393 | 0 | 108 | 501 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\src\syscall.c | C | 278 | 0 | 90 | 368 |
|
||||
| d:\Projects\C\cleonos\cleonos\c\stub.c | C | 3 | 4 | 2 | 9 |
|
||||
| d:\Projects\C\cleonos\cleonos\rust\src\lib.rs | Rust | 23 | 0 | 9 | 32 |
|
||||
| d:\Projects\C\cleonos\clks\arch\aarch64\boot.c | C | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\boot.c | C | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\exec_stack_call.S | Go Assembly | 40 | 0 | 8 | 48 |
|
||||
| d:\Projects\C\cleonos\clks\arch\x86_64\interrupt_stubs.S | Go Assembly | 108 | 0 | 12 | 120 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\audio\pcspeaker.c | C | 101 | 0 | 25 | 126 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\serial\serial.c | C | 52 | 0 | 16 | 68 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\font8x8.c | C | 67 | 0 | 8 | 75 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\font8x8.h | C++ | 5 | 0 | 3 | 8 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\framebuffer.c | C | 251 | 0 | 70 | 321 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\psf_font.c | C | 230 | 0 | 56 | 286 |
|
||||
| d:\Projects\C\cleonos\clks\drivers\video\psf_font.h | C++ | 15 | 0 | 5 | 20 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\audio.h | C++ | 9 | 0 | 3 | 12 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\boot.h | C++ | 11 | 0 | 4 | 15 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\compiler.h | C++ | 13 | 0 | 4 | 17 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\cpu.h | C++ | 20 | 0 | 4 | 24 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\desktop.h | C++ | 7 | 0 | 4 | 11 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\driver.h | C++ | 29 | 0 | 8 | 37 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\elf64.h | C++ | 32 | 0 | 9 | 41 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\elfrunner.h | C++ | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\exec.h | C++ | 81 | 0 | 8 | 89 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\framebuffer.h | C++ | 26 | 0 | 6 | 32 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\fs.h | C++ | 23 | 0 | 7 | 30 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\heap.h | C++ | 15 | 0 | 4 | 19 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\interrupts.h | C++ | 6 | 0 | 3 | 9 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\kelf.h | C++ | 9 | 0 | 5 | 14 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\kernel.h | C++ | 4 | 0 | 2 | 6 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\keyboard.h | C++ | 27 | 0 | 6 | 33 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\limine.h | C++ | 132 | 0 | 24 | 156 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\log.h | C++ | 14 | 0 | 5 | 19 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\mouse.h | C++ | 20 | 0 | 6 | 26 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\panic.h | C++ | 12 | 0 | 4 | 16 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\pmm.h | C++ | 16 | 0 | 5 | 21 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\ramdisk.h | C++ | 17 | 0 | 8 | 25 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\scheduler.h | C++ | 18 | 0 | 5 | 23 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\serial.h | C++ | 6 | 0 | 2 | 8 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\service.h | C++ | 31 | 0 | 8 | 39 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\shell.h | C++ | 7 | 0 | 3 | 10 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\string.h | C++ | 9 | 0 | 3 | 12 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\syscall.h | C++ | 88 | 0 | 5 | 93 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\task.h | C++ | 24 | 0 | 7 | 31 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\tty.h | C++ | 15 | 0 | 4 | 19 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\types.h | C++ | 17 | 0 | 6 | 23 |
|
||||
| d:\Projects\C\cleonos\clks\include\clks\userland.h | C++ | 12 | 0 | 4 | 16 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\desktop.c | C | 321 | 0 | 86 | 407 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\driver.c | C | 169 | 0 | 49 | 218 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\elf64.c | C | 239 | 0 | 73 | 312 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\elfrunner.c | C | 30 | 0 | 8 | 38 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\exec.c | C | 2,037 | 1 | 555 | 2,593 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\fs.c | C | 701 | 0 | 222 | 923 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\heap.c | C | 134 | 0 | 42 | 176 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\interrupts.c | C | 317 | 0 | 44 | 361 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\kelf.c | C | 203 | 1 | 53 | 257 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\keyboard.c | C | 379 | 0 | 96 | 475 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\kmain.c | C | 388 | 1 | 77 | 466 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\limine_requests.c | C | 76 | 0 | 26 | 102 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\log.c | C | 185 | 0 | 48 | 233 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\mouse.c | C | 246 | 0 | 63 | 309 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\panic.c | C | 546 | 0 | 155 | 701 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\pmm.c | C | 82 | 0 | 23 | 105 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\ramdisk.c | C | 172 | 0 | 50 | 222 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\scheduler.c | C | 136 | 0 | 44 | 180 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\service.c | C | 113 | 0 | 34 | 147 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\shell.c | C | 1,250 | 0 | 317 | 1,567 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\syscall.c | C | 1,588 | 0 | 401 | 1,989 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\tty.c | C | 1,188 | 0 | 290 | 1,478 |
|
||||
| d:\Projects\C\cleonos\clks\kernel\userland.c | C | 145 | 0 | 38 | 183 |
|
||||
| d:\Projects\C\cleonos\clks\lib\libc_compat.c | C | 25 | 0 | 7 | 32 |
|
||||
| d:\Projects\C\cleonos\clks\lib\string.c | C | 54 | 0 | 16 | 70 |
|
||||
| d:\Projects\C\cleonos\clks\rust\src\lib.rs | Rust | 21 | 0 | 6 | 27 |
|
||||
| d:\Projects\C\cleonos\cmake\check_tools.cmake | CMake | 34 | 0 | 7 | 41 |
|
||||
| d:\Projects\C\cleonos\cmake\gen_kernel_symbols.cmake | CMake | 80 | 0 | 26 | 106 |
|
||||
| d:\Projects\C\cleonos\cmake\log.cmake | CMake | 30 | 0 | 6 | 36 |
|
||||
| d:\Projects\C\cleonos\cmake\log_emit.cmake | CMake | 23 | 0 | 6 | 29 |
|
||||
| d:\Projects\C\cleonos\cmake\setup_limine.cmake | CMake | 100 | 0 | 19 | 119 |
|
||||
| d:\Projects\C\cleonos\configs\limine.conf | Properties | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\C\cleonos\configs\menuconfig\clks_features.json | JSON | 196 | 0 | 1 | 197 |
|
||||
| d:\Projects\C\cleonos\docs\README.md | Markdown | 31 | 0 | 4 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage1.md | Markdown | 41 | 0 | 5 | 46 |
|
||||
| d:\Projects\C\cleonos\docs\stage10.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage11.md | Markdown | 36 | 0 | 5 | 41 |
|
||||
| d:\Projects\C\cleonos\docs\stage12.md | Markdown | 40 | 0 | 6 | 46 |
|
||||
| d:\Projects\C\cleonos\docs\stage13.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage14.md | Markdown | 44 | 0 | 8 | 52 |
|
||||
| d:\Projects\C\cleonos\docs\stage15.md | Markdown | 47 | 0 | 7 | 54 |
|
||||
| d:\Projects\C\cleonos\docs\stage2.md | Markdown | 30 | 0 | 5 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage20.md | Markdown | 46 | 0 | 6 | 52 |
|
||||
| d:\Projects\C\cleonos\docs\stage21.md | Markdown | 72 | 0 | 7 | 79 |
|
||||
| d:\Projects\C\cleonos\docs\stage22.md | Markdown | 68 | 0 | 7 | 75 |
|
||||
| d:\Projects\C\cleonos\docs\stage23.md | Markdown | 41 | 0 | 6 | 47 |
|
||||
| d:\Projects\C\cleonos\docs\stage24.md | Markdown | 42 | 0 | 7 | 49 |
|
||||
| d:\Projects\C\cleonos\docs\stage25.md | Markdown | 58 | 0 | 7 | 65 |
|
||||
| d:\Projects\C\cleonos\docs\stage26.md | Markdown | 32 | 0 | 7 | 39 |
|
||||
| d:\Projects\C\cleonos\docs\stage27.md | Markdown | 32 | 0 | 7 | 39 |
|
||||
| d:\Projects\C\cleonos\docs\stage28.md | Markdown | 37 | 0 | 7 | 44 |
|
||||
| d:\Projects\C\cleonos\docs\stage29.md | Markdown | 33 | 0 | 7 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage3.md | Markdown | 29 | 0 | 5 | 34 |
|
||||
| d:\Projects\C\cleonos\docs\stage4.md | Markdown | 30 | 0 | 5 | 35 |
|
||||
| d:\Projects\C\cleonos\docs\stage5.md | Markdown | 29 | 0 | 5 | 34 |
|
||||
| d:\Projects\C\cleonos\docs\stage6.md | Markdown | 30 | 0 | 6 | 36 |
|
||||
| d:\Projects\C\cleonos\docs\stage7.md | Markdown | 34 | 0 | 6 | 40 |
|
||||
| d:\Projects\C\cleonos\docs\stage8.md | Markdown | 31 | 0 | 6 | 37 |
|
||||
| d:\Projects\C\cleonos\docs\stage9.md | Markdown | 31 | 0 | 6 | 37 |
|
||||
| d:\Projects\C\cleonos\docs\syscall.md | Markdown | 453 | 0 | 192 | 645 |
|
||||
| d:\Projects\C\cleonos\ramdisk\dev\random | C++ | 0 | 0 | 1 | 1 |
|
||||
| d:\Projects\C\cleonos\ramdisk\shell\init.cmd | Batch | 4 | 0 | 2 | 6 |
|
||||
| d:\Projects\C\cleonos\scripts\gen-tty-psf.ps1 | PowerShell | 171 | 2 | 42 | 215 |
|
||||
| d:\Projects\C\cleonos\scripts\menuconfig.py | Python | 986 | 24 | 204 | 1,214 |
|
||||
| d:\Projects\C\cleonos\wine\README.md | Markdown | 49 | 0 | 19 | 68 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine.py | Python | 3 | 1 | 3 | 7 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\__init__.py | Python | 4 | 0 | 1 | 5 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\cli.py | Python | 44 | 0 | 10 | 54 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\constants.py | Python | 76 | 1 | 11 | 88 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\input_pump.py | Python | 82 | 0 | 17 | 99 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\platform.py | Python | 55 | 0 | 5 | 60 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\runner.py | Python | 990 | 0 | 175 | 1,165 |
|
||||
| d:\Projects\C\cleonos\wine\cleonos_wine_lib\state.py | Python | 164 | 0 | 40 | 204 |
|
||||
| d:\Projects\C\cleonos\wine\requirements.txt | pip requirements | 1 | 0 | 1 | 2 |
|
||||
| Total | | 30,325 | 37 | 7,514 | 37,876 |
|
||||
+---------------------------------------------------------------+------------------+------------+------------+------------+------------+
|
||||
14
.clang-format
Normal file
14
.clang-format
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
Language: Cpp
|
||||
BasedOnStyle: LLVM
|
||||
IndentWidth: 4
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
ColumnLimit: 120
|
||||
BreakBeforeBraces: Attach
|
||||
PointerAlignment: Right
|
||||
SortIncludes: Never
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
SpaceBeforeParens: ControlStatements
|
||||
...
|
||||
30
.github/workflows/build-os.yml
vendored
30
.github/workflows/build-os.yml
vendored
@@ -3,6 +3,21 @@ name: Build CLeonOS
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
menuconfig_preset:
|
||||
description: "menuconfig preset (full/minimal/dev)"
|
||||
type: choice
|
||||
options:
|
||||
- full
|
||||
- minimal
|
||||
- dev
|
||||
required: false
|
||||
default: "full"
|
||||
menuconfig_overrides:
|
||||
description: "Optional extra menuconfig args, e.g. --set CLEONOS_CLKS_ENABLE_AUDIO=OFF"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -10,6 +25,9 @@ permissions:
|
||||
jobs:
|
||||
build-os:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MENUCONFIG_PRESET: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.menuconfig_preset || 'full' }}
|
||||
MENUCONFIG_OVERRIDES: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.menuconfig_overrides || '' }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -39,6 +57,18 @@ jobs:
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Generate menuconfig (shared preset)
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
extra_args=()
|
||||
if [[ -n "${MENUCONFIG_OVERRIDES}" ]]; then
|
||||
# shellcheck disable=SC2206
|
||||
extra_args=(${MENUCONFIG_OVERRIDES})
|
||||
fi
|
||||
python3 scripts/menuconfig.py --defaults --non-interactive --preset "${MENUCONFIG_PRESET}" "${extra_args[@]}"
|
||||
echo "menuconfig generated with preset=${MENUCONFIG_PRESET}"
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
cmake -S . -B build-cmake \
|
||||
|
||||
127
.github/workflows/style-check.yml
vendored
Normal file
127
.github/workflows/style-check.yml
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
name: Code Style Check
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
STYLE_FIX_BRANCH: codex/style-autofix-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install clang-format
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang-format
|
||||
|
||||
- name: Resolve base ref
|
||||
id: base
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
echo "base_ref=${{ github.event.pull_request.head.ref }}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "base_ref=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Detect auto-fix capability
|
||||
id: capability
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
can_fix=false
|
||||
if [[ "${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||
can_fix=true
|
||||
elif [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.head.repo.full_name }}" == "${{ github.repository }}" ]]; then
|
||||
can_fix=true
|
||||
fi
|
||||
echo "can_fix=$can_fix" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Run clang-format and detect drift
|
||||
id: format
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
mapfile -t files < <(
|
||||
git ls-files \
|
||||
'*.c' '*.h' '*.cc' '*.cpp' '*.cxx' '*.hpp' '*.hxx' \
|
||||
| grep -Ev '^(limine/|third_party/|build/|build-cmake/)' || true
|
||||
)
|
||||
|
||||
if [[ ${#files[@]} -eq 0 ]]; then
|
||||
echo "No C/C++ files to check."
|
||||
echo "changed=false" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for f in "${files[@]}"; do
|
||||
clang-format -i "$f"
|
||||
done
|
||||
|
||||
if git diff --quiet -- "${files[@]}"; then
|
||||
echo "changed=false" >> "$GITHUB_OUTPUT"
|
||||
echo "Code style check passed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||
echo "Style drift detected. Auto-fix patch:"
|
||||
echo ""
|
||||
git diff -- "${files[@]}"
|
||||
|
||||
- name: Create auto-fix PR
|
||||
id: cpr
|
||||
if: steps.format.outputs.changed == 'true' && steps.capability.outputs.can_fix == 'true'
|
||||
continue-on-error: true
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
token: ${{ secrets.STYLE_PR_TOKEN != '' && secrets.STYLE_PR_TOKEN || secrets.GITHUB_TOKEN }}
|
||||
commit-message: "style: auto-format C/C++ sources with clang-format"
|
||||
title: "style: auto-format C/C++ sources"
|
||||
body: |
|
||||
This PR was generated automatically by CI style check.
|
||||
|
||||
- Trigger: `${{ github.event_name }}`
|
||||
- Base branch: `${{ steps.base.outputs.base_ref }}`
|
||||
- Formatter: `clang-format`
|
||||
branch: ${{ env.STYLE_FIX_BRANCH }}
|
||||
base: ${{ steps.base.outputs.base_ref }}
|
||||
delete-branch: true
|
||||
labels: |
|
||||
automated
|
||||
style
|
||||
|
||||
- name: Report auto-fix PR result
|
||||
if: steps.format.outputs.changed == 'true' && steps.capability.outputs.can_fix == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ steps.cpr.outcome }}" == "success" ]]; then
|
||||
echo "Auto-fix PR created: ${{ steps.cpr.outputs.pull-request-url }}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "::warning::Auto-fix branch was pushed, but PR creation is blocked by repository policy."
|
||||
echo "::warning::Enable 'Allow GitHub Actions to create and approve pull requests' OR set secret STYLE_PR_TOKEN (PAT with repo scope)."
|
||||
echo "Manual PR URL:"
|
||||
echo "https://github.com/${{ github.repository }}/compare/${{ steps.base.outputs.base_ref }}...${{ env.STYLE_FIX_BRANCH }}?expand=1"
|
||||
exit 0
|
||||
|
||||
- name: Fail when style drift cannot be auto-fixed
|
||||
if: steps.format.outputs.changed == 'true' && steps.capability.outputs.can_fix != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Style drift found, but this event does not have permission to auto-create a fix PR."
|
||||
echo "Please run clang-format locally and push the result."
|
||||
exit 1
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -2,7 +2,6 @@ build/
|
||||
build-cmake*/
|
||||
*.iso
|
||||
*.tar
|
||||
limine/
|
||||
|
||||
# CMake generated files
|
||||
CMakeCache.txt
|
||||
@@ -12,3 +11,9 @@ compile_commands.json
|
||||
CTestTestfile.cmake
|
||||
Testing/
|
||||
.cmake/
|
||||
|
||||
# menuconfig generated
|
||||
configs/menuconfig/.config.json
|
||||
configs/menuconfig/config.cmake
|
||||
|
||||
venv/
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
||||
[submodule "limine"]
|
||||
path = limine
|
||||
url = https://github.com/limine-bootloader/limine.git
|
||||
[submodule "cleonos/third-party/doomgeneric"]
|
||||
path = cleonos/third-party/doomgeneric
|
||||
url = https://github.com/ozkl/doomgeneric.git
|
||||
|
||||
375
CMakeLists.txt
375
CMakeLists.txt
@@ -11,6 +11,8 @@ set(LD "x86_64-elf-ld" CACHE STRING "Kernel linker")
|
||||
set(USER_CC "cc" CACHE STRING "User-space C compiler")
|
||||
set(USER_LD "ld" CACHE STRING "User-space linker")
|
||||
set(RUSTC "rustc" CACHE STRING "Rust compiler")
|
||||
set(NM "nm" CACHE STRING "nm executable")
|
||||
set(ADDR2LINE "addr2line" CACHE STRING "addr2line executable")
|
||||
|
||||
set(XORRISO "xorriso" CACHE STRING "xorriso executable")
|
||||
set(TAR "tar" CACHE STRING "tar executable")
|
||||
@@ -87,6 +89,7 @@ set(RAMDISK_ROOT "${BUILD_ROOT}/ramdisk_root")
|
||||
set(KERNEL_ELF "${BUILD_ROOT}/clks_kernel.elf")
|
||||
set(RAMDISK_IMAGE "${BUILD_ROOT}/cleonos_ramdisk.tar")
|
||||
set(ISO_IMAGE "${CMAKE_SOURCE_DIR}/build/CLeonOS-x86_64.iso")
|
||||
set(KERNEL_SYMBOLS_FILE "${BUILD_ROOT}/kernel.sym")
|
||||
|
||||
set(USER_BUILD_ROOT "${BUILD_ROOT}/user")
|
||||
set(USER_OBJ_ROOT "${USER_BUILD_ROOT}/obj")
|
||||
@@ -99,6 +102,8 @@ resolve_tool_with_fallback(CC gcc cc clang)
|
||||
resolve_tool_with_fallback(LD ld.lld ld)
|
||||
resolve_tool_with_fallback(USER_CC cc gcc clang)
|
||||
resolve_tool_with_fallback(USER_LD ld.lld ld)
|
||||
resolve_tool_with_fallback(NM llvm-nm x86_64-elf-nm nm)
|
||||
resolve_tool_with_fallback(ADDR2LINE llvm-addr2line x86_64-elf-addr2line addr2line)
|
||||
resolve_tool_with_fallback(OBJCOPY_FOR_TARGET llvm-objcopy x86_64-linux-gnu-objcopy objcopy)
|
||||
resolve_tool_with_fallback(OBJDUMP_FOR_TARGET llvm-objdump x86_64-linux-gnu-objdump objdump)
|
||||
resolve_tool_with_fallback(READELF_FOR_TARGET llvm-readelf x86_64-linux-gnu-readelf readelf)
|
||||
@@ -112,12 +117,144 @@ set(CLKS_ARCH "x86_64" CACHE STRING "Target CLKS arch")
|
||||
set(LINKER_SCRIPT "${CMAKE_SOURCE_DIR}/clks/arch/${CLKS_ARCH}/linker.ld")
|
||||
set(USER_LINKER_SCRIPT "${CMAKE_SOURCE_DIR}/cleonos/c/user.ld")
|
||||
set(KELF_LINKER_SCRIPT "${CMAKE_SOURCE_DIR}/cleonos/c/kelf.ld")
|
||||
set(CLEONOS_MENUCONFIG_CMAKE "${CMAKE_SOURCE_DIR}/configs/menuconfig/config.cmake" CACHE FILEPATH "menuconfig generated CMake config")
|
||||
|
||||
if(EXISTS "${CLEONOS_MENUCONFIG_CMAKE}")
|
||||
include("${CLEONOS_MENUCONFIG_CMAKE}")
|
||||
cl_log_info("menuconfig loaded from ${CLEONOS_MENUCONFIG_CMAKE}")
|
||||
endif()
|
||||
|
||||
function(cl_set_bool_cache VAR_NAME DEFAULT_VALUE DOC_TEXT)
|
||||
set(_raw_value "")
|
||||
set(_has_value OFF)
|
||||
|
||||
if(DEFINED ${VAR_NAME})
|
||||
set(_raw_value "${${VAR_NAME}}")
|
||||
set(_has_value ON)
|
||||
elseif(DEFINED ${VAR_NAME}_IS_ENABLED)
|
||||
set(_raw_value "${${VAR_NAME}_IS_ENABLED}")
|
||||
set(_has_value ON)
|
||||
endif()
|
||||
|
||||
if(NOT _has_value)
|
||||
set(${VAR_NAME} ${DEFAULT_VALUE} CACHE BOOL "${DOC_TEXT}")
|
||||
else()
|
||||
string(TOUPPER "${_raw_value}" _raw_upper)
|
||||
if(_raw_upper STREQUAL "Y" OR _raw_upper STREQUAL "M" OR _raw_upper STREQUAL "ON" OR _raw_upper STREQUAL "TRUE" OR _raw_upper STREQUAL "1")
|
||||
set(_bool_value ON)
|
||||
else()
|
||||
set(_bool_value OFF)
|
||||
endif()
|
||||
set(${VAR_NAME} ${_bool_value} CACHE BOOL "${DOC_TEXT}" FORCE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(cl_bool_to_int BOOL_VAR OUT_VAR)
|
||||
if(${BOOL_VAR})
|
||||
set(${OUT_VAR} 1 PARENT_SCOPE)
|
||||
else()
|
||||
set(${OUT_VAR} 0 PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_AUDIO ON "Initialize kernel audio subsystem")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_MOUSE ON "Initialize kernel mouse subsystem")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_DESKTOP ON "Initialize desktop compositor subsystem")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_DRIVER_MANAGER ON "Initialize kernel driver manager")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_KELF ON "Enable KELF app dispatcher")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USERLAND_AUTO_EXEC ON "Auto exec /shell/shell.elf on boot")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_HEAP_SELFTEST ON "Run heap selftest at boot")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_EXTERNAL_PSF ON "Load /system/tty.psf external font")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_KEYBOARD ON "Initialize keyboard input subsystem")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_ELFRUNNER_PROBE ON "Run ELFRUNNER kernel ELF probe")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_KLOGD_TASK ON "Enable scheduler klogd task")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_KWORKER_TASK ON "Enable scheduler kworker task")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USRD_TASK ON "Enable scheduler usrd task")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_BOOT_VIDEO_LOG ON "Print boot framebuffer geometry logs")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_PMM_STATS_LOG ON "Print PMM stats logs")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_HEAP_STATS_LOG ON "Print heap stats logs")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_FS_ROOT_LOG ON "Print root children FS log")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_SYSTEM_DIR_CHECK ON "Require /system directory sanity check")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_ELFRUNNER_INIT ON "Initialize ELFRUNNER framework")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_SYSCALL_TICK_QUERY ON "Query syscall timer ticks at boot")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_TTY_READY_LOG ON "Print TTY ready logs")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_IDLE_DEBUG_LOG ON "Print idle loop debug log")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_PROCFS ON "Enable virtual /proc procfs syscall layer")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_EXEC_SERIAL_LOG ON "Enable EXEC info logs on serial output")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USC ON "Enable UserSafeController dangerous syscall confirmations")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USC_SC_FS_MKDIR ON "USC intercept policy: FS_MKDIR")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USC_SC_FS_WRITE ON "USC intercept policy: FS_WRITE")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USC_SC_FS_APPEND ON "USC intercept policy: FS_APPEND")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USC_SC_FS_REMOVE ON "USC intercept policy: FS_REMOVE")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USC_SC_EXEC_PATH ON "USC intercept policy: EXEC_PATH")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USC_SC_EXEC_PATHV ON "USC intercept policy: EXEC_PATHV")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USC_SC_EXEC_PATHV_IO ON "USC intercept policy: EXEC_PATHV_IO")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USC_SC_SPAWN_PATH ON "USC intercept policy: SPAWN_PATH")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USC_SC_SPAWN_PATHV ON "USC intercept policy: SPAWN_PATHV")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USC_SC_PROC_KILL ON "USC intercept policy: PROC_KILL")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USC_SC_SHUTDOWN ON "USC intercept policy: SHUTDOWN")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USC_SC_RESTART ON "USC intercept policy: RESTART")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_KBD_TTY_SWITCH_HOTKEY ON "Enable ALT+F1..F4 TTY switch hotkey")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_KBD_CTRL_SHORTCUTS ON "Enable Ctrl+A/C/V keyboard shortcuts")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_KBD_FORCE_STOP_HOTKEY ON "Enable Ctrl+Alt+C force-stop hotkey")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USER_INIT_SCRIPT_PROBE ON "Probe /shell/init.cmd during userland init")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_USER_SYSTEM_APP_PROBE ON "Probe /system apps (elfrunner/memc) during userland init")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_SCHED_TASK_COUNT_LOG ON "Print scheduler task count during boot")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_INTERRUPT_READY_LOG ON "Print interrupt ready log after IDT/PIC init")
|
||||
cl_set_bool_cache(CLEONOS_CLKS_ENABLE_SHELL_MODE_LOG ON "Print default shell mode log during boot")
|
||||
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_AUDIO CLKS_CFG_AUDIO_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_MOUSE CLKS_CFG_MOUSE_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_DESKTOP CLKS_CFG_DESKTOP_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_DRIVER_MANAGER CLKS_CFG_DRIVER_MANAGER_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_KELF CLKS_CFG_KELF_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USERLAND_AUTO_EXEC CLKS_CFG_USERLAND_AUTO_EXEC_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_HEAP_SELFTEST CLKS_CFG_HEAP_SELFTEST_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_EXTERNAL_PSF CLKS_CFG_EXTERNAL_PSF_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_KEYBOARD CLKS_CFG_KEYBOARD_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_ELFRUNNER_PROBE CLKS_CFG_ELFRUNNER_PROBE_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_KLOGD_TASK CLKS_CFG_KLOGD_TASK_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_KWORKER_TASK CLKS_CFG_KWORKER_TASK_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USRD_TASK CLKS_CFG_USRD_TASK_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_BOOT_VIDEO_LOG CLKS_CFG_BOOT_VIDEO_LOG_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_PMM_STATS_LOG CLKS_CFG_PMM_STATS_LOG_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_HEAP_STATS_LOG CLKS_CFG_HEAP_STATS_LOG_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_FS_ROOT_LOG CLKS_CFG_FS_ROOT_LOG_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_SYSTEM_DIR_CHECK CLKS_CFG_SYSTEM_DIR_CHECK_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_ELFRUNNER_INIT CLKS_CFG_ELFRUNNER_INIT_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_SYSCALL_TICK_QUERY CLKS_CFG_SYSCALL_TICK_QUERY_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_TTY_READY_LOG CLKS_CFG_TTY_READY_LOG_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_IDLE_DEBUG_LOG CLKS_CFG_IDLE_DEBUG_LOG_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_PROCFS CLKS_CFG_PROCFS_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_EXEC_SERIAL_LOG CLKS_CFG_EXEC_SERIAL_LOG_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USC CLKS_CFG_USC_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USC_SC_FS_MKDIR CLKS_CFG_USC_SC_FS_MKDIR_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USC_SC_FS_WRITE CLKS_CFG_USC_SC_FS_WRITE_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USC_SC_FS_APPEND CLKS_CFG_USC_SC_FS_APPEND_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USC_SC_FS_REMOVE CLKS_CFG_USC_SC_FS_REMOVE_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USC_SC_EXEC_PATH CLKS_CFG_USC_SC_EXEC_PATH_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USC_SC_EXEC_PATHV CLKS_CFG_USC_SC_EXEC_PATHV_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USC_SC_EXEC_PATHV_IO CLKS_CFG_USC_SC_EXEC_PATHV_IO_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USC_SC_SPAWN_PATH CLKS_CFG_USC_SC_SPAWN_PATH_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USC_SC_SPAWN_PATHV CLKS_CFG_USC_SC_SPAWN_PATHV_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USC_SC_PROC_KILL CLKS_CFG_USC_SC_PROC_KILL_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USC_SC_SHUTDOWN CLKS_CFG_USC_SC_SHUTDOWN_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USC_SC_RESTART CLKS_CFG_USC_SC_RESTART_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_KBD_TTY_SWITCH_HOTKEY CLKS_CFG_KBD_TTY_SWITCH_HOTKEY_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_KBD_CTRL_SHORTCUTS CLKS_CFG_KBD_CTRL_SHORTCUTS_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_KBD_FORCE_STOP_HOTKEY CLKS_CFG_KBD_FORCE_STOP_HOTKEY_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USER_INIT_SCRIPT_PROBE CLKS_CFG_USER_INIT_SCRIPT_PROBE_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_USER_SYSTEM_APP_PROBE CLKS_CFG_USER_SYSTEM_APP_PROBE_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_SCHED_TASK_COUNT_LOG CLKS_CFG_SCHED_TASK_COUNT_LOG_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_INTERRUPT_READY_LOG CLKS_CFG_INTERRUPT_READY_LOG_INT)
|
||||
cl_bool_to_int(CLEONOS_CLKS_ENABLE_SHELL_MODE_LOG CLKS_CFG_SHELL_MODE_LOG_INT)
|
||||
|
||||
set(CFLAGS_COMMON
|
||||
-std=c11
|
||||
-ffreestanding
|
||||
-fno-stack-protector
|
||||
-fno-builtin
|
||||
-g
|
||||
-Wall
|
||||
-Wextra
|
||||
-Werror
|
||||
@@ -126,6 +263,51 @@ set(CFLAGS_COMMON
|
||||
|
||||
set(ARCH_CFLAGS
|
||||
-DCLKS_ARCH_X86_64=1
|
||||
"-DCLKS_CFG_AUDIO=${CLKS_CFG_AUDIO_INT}"
|
||||
"-DCLKS_CFG_MOUSE=${CLKS_CFG_MOUSE_INT}"
|
||||
"-DCLKS_CFG_DESKTOP=${CLKS_CFG_DESKTOP_INT}"
|
||||
"-DCLKS_CFG_DRIVER_MANAGER=${CLKS_CFG_DRIVER_MANAGER_INT}"
|
||||
"-DCLKS_CFG_KELF=${CLKS_CFG_KELF_INT}"
|
||||
"-DCLKS_CFG_USERLAND_AUTO_EXEC=${CLKS_CFG_USERLAND_AUTO_EXEC_INT}"
|
||||
"-DCLKS_CFG_HEAP_SELFTEST=${CLKS_CFG_HEAP_SELFTEST_INT}"
|
||||
"-DCLKS_CFG_EXTERNAL_PSF=${CLKS_CFG_EXTERNAL_PSF_INT}"
|
||||
"-DCLKS_CFG_KEYBOARD=${CLKS_CFG_KEYBOARD_INT}"
|
||||
"-DCLKS_CFG_ELFRUNNER_PROBE=${CLKS_CFG_ELFRUNNER_PROBE_INT}"
|
||||
"-DCLKS_CFG_KLOGD_TASK=${CLKS_CFG_KLOGD_TASK_INT}"
|
||||
"-DCLKS_CFG_KWORKER_TASK=${CLKS_CFG_KWORKER_TASK_INT}"
|
||||
"-DCLKS_CFG_USRD_TASK=${CLKS_CFG_USRD_TASK_INT}"
|
||||
"-DCLKS_CFG_BOOT_VIDEO_LOG=${CLKS_CFG_BOOT_VIDEO_LOG_INT}"
|
||||
"-DCLKS_CFG_PMM_STATS_LOG=${CLKS_CFG_PMM_STATS_LOG_INT}"
|
||||
"-DCLKS_CFG_HEAP_STATS_LOG=${CLKS_CFG_HEAP_STATS_LOG_INT}"
|
||||
"-DCLKS_CFG_FS_ROOT_LOG=${CLKS_CFG_FS_ROOT_LOG_INT}"
|
||||
"-DCLKS_CFG_SYSTEM_DIR_CHECK=${CLKS_CFG_SYSTEM_DIR_CHECK_INT}"
|
||||
"-DCLKS_CFG_ELFRUNNER_INIT=${CLKS_CFG_ELFRUNNER_INIT_INT}"
|
||||
"-DCLKS_CFG_SYSCALL_TICK_QUERY=${CLKS_CFG_SYSCALL_TICK_QUERY_INT}"
|
||||
"-DCLKS_CFG_TTY_READY_LOG=${CLKS_CFG_TTY_READY_LOG_INT}"
|
||||
"-DCLKS_CFG_IDLE_DEBUG_LOG=${CLKS_CFG_IDLE_DEBUG_LOG_INT}"
|
||||
"-DCLKS_CFG_PROCFS=${CLKS_CFG_PROCFS_INT}"
|
||||
"-DCLKS_CFG_EXEC_SERIAL_LOG=${CLKS_CFG_EXEC_SERIAL_LOG_INT}"
|
||||
"-DCLKS_CFG_USC=${CLKS_CFG_USC_INT}"
|
||||
"-DCLKS_CFG_USC_SC_FS_MKDIR=${CLKS_CFG_USC_SC_FS_MKDIR_INT}"
|
||||
"-DCLKS_CFG_USC_SC_FS_WRITE=${CLKS_CFG_USC_SC_FS_WRITE_INT}"
|
||||
"-DCLKS_CFG_USC_SC_FS_APPEND=${CLKS_CFG_USC_SC_FS_APPEND_INT}"
|
||||
"-DCLKS_CFG_USC_SC_FS_REMOVE=${CLKS_CFG_USC_SC_FS_REMOVE_INT}"
|
||||
"-DCLKS_CFG_USC_SC_EXEC_PATH=${CLKS_CFG_USC_SC_EXEC_PATH_INT}"
|
||||
"-DCLKS_CFG_USC_SC_EXEC_PATHV=${CLKS_CFG_USC_SC_EXEC_PATHV_INT}"
|
||||
"-DCLKS_CFG_USC_SC_EXEC_PATHV_IO=${CLKS_CFG_USC_SC_EXEC_PATHV_IO_INT}"
|
||||
"-DCLKS_CFG_USC_SC_SPAWN_PATH=${CLKS_CFG_USC_SC_SPAWN_PATH_INT}"
|
||||
"-DCLKS_CFG_USC_SC_SPAWN_PATHV=${CLKS_CFG_USC_SC_SPAWN_PATHV_INT}"
|
||||
"-DCLKS_CFG_USC_SC_PROC_KILL=${CLKS_CFG_USC_SC_PROC_KILL_INT}"
|
||||
"-DCLKS_CFG_USC_SC_SHUTDOWN=${CLKS_CFG_USC_SC_SHUTDOWN_INT}"
|
||||
"-DCLKS_CFG_USC_SC_RESTART=${CLKS_CFG_USC_SC_RESTART_INT}"
|
||||
"-DCLKS_CFG_KBD_TTY_SWITCH_HOTKEY=${CLKS_CFG_KBD_TTY_SWITCH_HOTKEY_INT}"
|
||||
"-DCLKS_CFG_KBD_CTRL_SHORTCUTS=${CLKS_CFG_KBD_CTRL_SHORTCUTS_INT}"
|
||||
"-DCLKS_CFG_KBD_FORCE_STOP_HOTKEY=${CLKS_CFG_KBD_FORCE_STOP_HOTKEY_INT}"
|
||||
"-DCLKS_CFG_USER_INIT_SCRIPT_PROBE=${CLKS_CFG_USER_INIT_SCRIPT_PROBE_INT}"
|
||||
"-DCLKS_CFG_USER_SYSTEM_APP_PROBE=${CLKS_CFG_USER_SYSTEM_APP_PROBE_INT}"
|
||||
"-DCLKS_CFG_SCHED_TASK_COUNT_LOG=${CLKS_CFG_SCHED_TASK_COUNT_LOG_INT}"
|
||||
"-DCLKS_CFG_INTERRUPT_READY_LOG=${CLKS_CFG_INTERRUPT_READY_LOG_INT}"
|
||||
"-DCLKS_CFG_SHELL_MODE_LOG=${CLKS_CFG_SHELL_MODE_LOG_INT}"
|
||||
-m64
|
||||
-mno-red-zone
|
||||
-mcmodel=kernel
|
||||
@@ -155,6 +337,24 @@ set(USER_CFLAGS
|
||||
"-I${CMAKE_SOURCE_DIR}/cleonos/c/include"
|
||||
)
|
||||
|
||||
set(USER_CFLAGS_DOOM
|
||||
-std=c11
|
||||
-ffreestanding
|
||||
-fno-stack-protector
|
||||
-fno-builtin
|
||||
-Wall
|
||||
-Wextra
|
||||
-Wno-error
|
||||
-Wno-unused-parameter
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-sign-compare
|
||||
-D_DEFAULT_SOURCE
|
||||
-D_POSIX_C_SOURCE=200809L
|
||||
"-I${CMAKE_SOURCE_DIR}/cleonos/third-party/doomgeneric/doomgeneric"
|
||||
"-include"
|
||||
"${CMAKE_SOURCE_DIR}/cleonos/c/apps/doom/doom_shim.h"
|
||||
)
|
||||
|
||||
set(USER_LDFLAGS
|
||||
-nostdlib
|
||||
-z
|
||||
@@ -177,8 +377,6 @@ endif()
|
||||
|
||||
set(KERNEL_SOURCE_DIRS
|
||||
"${CMAKE_SOURCE_DIR}/clks/kernel"
|
||||
"${CMAKE_SOURCE_DIR}/clks/lib"
|
||||
"${CMAKE_SOURCE_DIR}/clks/drivers"
|
||||
"${CMAKE_SOURCE_DIR}/clks/arch/${CLKS_ARCH}"
|
||||
)
|
||||
|
||||
@@ -203,6 +401,25 @@ list(REMOVE_DUPLICATES ASM_SOURCES)
|
||||
list(SORT C_SOURCES)
|
||||
list(SORT ASM_SOURCES)
|
||||
|
||||
set(CLKS_BOOT_LIMINE_SOURCE "clks/kernel/boot/limine/limine_requests.c")
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/${CLKS_BOOT_LIMINE_SOURCE}")
|
||||
list(APPEND C_SOURCES "${CLKS_BOOT_LIMINE_SOURCE}")
|
||||
list(REMOVE_DUPLICATES C_SOURCES)
|
||||
list(SORT C_SOURCES)
|
||||
else()
|
||||
cl_log_error("missing required boot source: ${CLKS_BOOT_LIMINE_SOURCE}")
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE KERNEL_INC_SOURCES_ABS CONFIGURE_DEPENDS
|
||||
"${CMAKE_SOURCE_DIR}/clks/**/*.inc"
|
||||
)
|
||||
list(SORT KERNEL_INC_SOURCES_ABS)
|
||||
|
||||
file(GLOB_RECURSE USER_INC_SOURCES_ABS CONFIGURE_DEPENDS
|
||||
"${CMAKE_SOURCE_DIR}/cleonos/**/*.inc"
|
||||
)
|
||||
list(SORT USER_INC_SOURCES_ABS)
|
||||
|
||||
if(NOT C_SOURCES)
|
||||
cl_log_error("no kernel C sources found in clks/")
|
||||
endif()
|
||||
@@ -248,12 +465,13 @@ function(add_kernel_c_object SRC OUTPUT_LIST_VAR)
|
||||
string(REGEX REPLACE "\\.c$" ".o" OBJ_REL "${SRC}")
|
||||
set(OBJ_PATH "${OBJ_ROOT}/${OBJ_REL}")
|
||||
get_filename_component(OBJ_DIR "${OBJ_PATH}" DIRECTORY)
|
||||
set(_deps "${CMAKE_SOURCE_DIR}/${SRC}" ${KERNEL_INC_SOURCES_ABS})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${OBJ_PATH}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${OBJ_DIR}"
|
||||
COMMAND ${CC} ${CFLAGS_COMMON} ${ARCH_CFLAGS} -c "${CMAKE_SOURCE_DIR}/${SRC}" -o "${OBJ_PATH}"
|
||||
DEPENDS "${CMAKE_SOURCE_DIR}/${SRC}"
|
||||
DEPENDS ${_deps}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
@@ -264,12 +482,13 @@ function(add_kernel_asm_object SRC OUTPUT_LIST_VAR)
|
||||
string(REGEX REPLACE "\\.S$" ".o" OBJ_REL "${SRC}")
|
||||
set(OBJ_PATH "${OBJ_ROOT}/${OBJ_REL}")
|
||||
get_filename_component(OBJ_DIR "${OBJ_PATH}" DIRECTORY)
|
||||
set(_deps "${CMAKE_SOURCE_DIR}/${SRC}" ${KERNEL_INC_SOURCES_ABS})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${OBJ_PATH}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${OBJ_DIR}"
|
||||
COMMAND ${CC} ${ASFLAGS_COMMON} ${ARCH_CFLAGS} -c "${CMAKE_SOURCE_DIR}/${SRC}" -o "${OBJ_PATH}"
|
||||
DEPENDS "${CMAKE_SOURCE_DIR}/${SRC}"
|
||||
DEPENDS ${_deps}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
@@ -280,12 +499,30 @@ function(add_user_c_object SRC OUTPUT_VAR)
|
||||
string(REGEX REPLACE "\\.c$" ".o" OBJ_REL "${SRC}")
|
||||
set(OBJ_PATH "${USER_OBJ_ROOT}/${OBJ_REL}")
|
||||
get_filename_component(OBJ_DIR "${OBJ_PATH}" DIRECTORY)
|
||||
set(_deps "${CMAKE_SOURCE_DIR}/${SRC}" ${USER_INC_SOURCES_ABS})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${OBJ_PATH}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${OBJ_DIR}"
|
||||
COMMAND ${USER_CC} ${USER_CFLAGS} -c "${CMAKE_SOURCE_DIR}/${SRC}" -o "${OBJ_PATH}"
|
||||
DEPENDS "${CMAKE_SOURCE_DIR}/${SRC}"
|
||||
DEPENDS ${_deps}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
set(${OUTPUT_VAR} "${OBJ_PATH}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(add_user_c_object_doom SRC OUTPUT_VAR)
|
||||
string(REGEX REPLACE "\\.c$" ".o" OBJ_REL "${SRC}")
|
||||
set(OBJ_PATH "${USER_OBJ_ROOT}/${OBJ_REL}")
|
||||
get_filename_component(OBJ_DIR "${OBJ_PATH}" DIRECTORY)
|
||||
set(_deps "${CMAKE_SOURCE_DIR}/${SRC}" ${USER_INC_SOURCES_ABS} ${DOOMGENERIC_DEP_SOURCES_ABS})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${OBJ_PATH}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${OBJ_DIR}"
|
||||
COMMAND ${USER_CC} ${USER_CFLAGS_DOOM} -c "${CMAKE_SOURCE_DIR}/${SRC}" -o "${OBJ_PATH}"
|
||||
DEPENDS ${_deps}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
@@ -318,6 +555,22 @@ add_custom_command(
|
||||
|
||||
add_custom_target(kernel DEPENDS "${KERNEL_ELF}")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${KERNEL_SYMBOLS_FILE}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${BUILD_ROOT}"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
"-DNM_TOOL=${NM}"
|
||||
"-DADDR2LINE_TOOL=${ADDR2LINE}"
|
||||
"-DKERNEL_ELF=${KERNEL_ELF}"
|
||||
"-DOUT_SYMBOL_FILE=${KERNEL_SYMBOLS_FILE}"
|
||||
-P "${CMAKE_SOURCE_DIR}/cmake/gen_kernel_symbols.cmake"
|
||||
DEPENDS "${KERNEL_ELF}" "${CMAKE_SOURCE_DIR}/cmake/gen_kernel_symbols.cmake"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_target(kernel-symbols DEPENDS "${KERNEL_SYMBOLS_FILE}")
|
||||
add_dependencies(kernel-symbols kernel)
|
||||
|
||||
set(USER_COMMON_OBJECTS)
|
||||
foreach(SRC IN LISTS USER_COMMON_SOURCES)
|
||||
add_user_c_object("${SRC}" OBJ_OUT)
|
||||
@@ -347,15 +600,39 @@ set(RAMDISK_DRIVER_APPS)
|
||||
set(RAMDISK_SYSTEM_APPS)
|
||||
set(RAMDISK_ROOT_APPS)
|
||||
|
||||
set(DOOMGENERIC_DIR "${CMAKE_SOURCE_DIR}/cleonos/third-party/doomgeneric/doomgeneric")
|
||||
set(DOOMGENERIC_SRC_BASENAMES
|
||||
dummy am_map doomdef doomstat dstrings d_event d_items d_iwad d_loop d_main d_mode d_net f_finale f_wipe
|
||||
g_game hu_lib hu_stuff info i_cdmus i_endoom i_joystick i_scale i_sound i_system i_timer memio m_argv
|
||||
m_bbox m_cheat m_config m_controls m_fixed m_menu m_misc m_random p_ceilng p_doors p_enemy p_floor
|
||||
p_inter p_lights p_map p_maputl p_mobj p_plats p_pspr p_saveg p_setup p_sight p_spec p_switch p_telept
|
||||
p_tick p_user r_bsp r_data r_draw r_main r_plane r_segs r_sky r_things sha1 sounds statdump st_lib st_stuff
|
||||
s_sound tables v_video wi_stuff w_checksum w_file w_main w_wad z_zone w_file_stdc i_input i_video doomgeneric
|
||||
)
|
||||
set(DOOMGENERIC_APP_SOURCES)
|
||||
foreach(_base IN LISTS DOOMGENERIC_SRC_BASENAMES)
|
||||
list(APPEND DOOMGENERIC_APP_SOURCES "cleonos/third-party/doomgeneric/doomgeneric/${_base}.c")
|
||||
endforeach()
|
||||
file(GLOB_RECURSE DOOMGENERIC_DEP_SOURCES_ABS CONFIGURE_DEPENDS
|
||||
"${CMAKE_SOURCE_DIR}/cleonos/third-party/doomgeneric/doomgeneric/*.h"
|
||||
"${CMAKE_SOURCE_DIR}/cleonos/c/apps/doom/*.h"
|
||||
)
|
||||
list(SORT DOOMGENERIC_DEP_SOURCES_ABS)
|
||||
|
||||
set(USER_SHELL_COMMAND_APPS
|
||||
help ls cat pwd cd exec pid spawn wait sleep yield
|
||||
shutdown restart exit clear ansi memstat fsstat taskstat userstat
|
||||
shstat stats tty dmesg kbdstat mkdir touch write append cp mv rm
|
||||
help args ls cat grep head tail wc cut uniq sort pwd cd exec pid spawn wait sleep yield
|
||||
bg fg jobs kill ps top
|
||||
procstat sysstat
|
||||
shutdown restart exit clear ansi ansitest wavplay fastfetch memstat fsstat taskstat userstat
|
||||
shstat stats tty dmesg kbdstat mkdir touch write append cp mv rm kdbg
|
||||
)
|
||||
|
||||
foreach(SRC IN LISTS USER_APP_MAIN_SOURCES)
|
||||
get_filename_component(_stem "${SRC}" NAME_WE)
|
||||
string(REGEX REPLACE "_main$" "" _app_name "${_stem}")
|
||||
string(TOUPPER "${_app_name}" _app_name_upper)
|
||||
string(REGEX REPLACE "[^A-Z0-9]" "_" _app_name_key "${_app_name_upper}")
|
||||
set(_app_enabled_var "CLEONOS_USER_APP_${_app_name_key}")
|
||||
|
||||
list(FIND USER_KELF_APP_NAMES "${_app_name}" _shadowed_by_kmain)
|
||||
if(NOT _shadowed_by_kmain EQUAL -1)
|
||||
@@ -363,6 +640,17 @@ foreach(SRC IN LISTS USER_APP_MAIN_SOURCES)
|
||||
continue()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED ${_app_enabled_var})
|
||||
set(${_app_enabled_var} ON CACHE BOOL "Build user app ${_app_name}")
|
||||
else()
|
||||
set(${_app_enabled_var} ${${_app_enabled_var}} CACHE BOOL "Build user app ${_app_name}" FORCE)
|
||||
endif()
|
||||
|
||||
if(NOT ${_app_enabled_var})
|
||||
cl_log_info("menuconfig: skip disabled user app ${_app_name}")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
list(FIND USER_APP_NAMES "${_app_name}" _dup_name_idx)
|
||||
if(NOT _dup_name_idx EQUAL -1)
|
||||
cl_log_error("duplicate user app name: ${_app_name}")
|
||||
@@ -376,13 +664,17 @@ foreach(SRC IN LISTS USER_APP_MAIN_SOURCES)
|
||||
"${CMAKE_SOURCE_DIR}/cleonos/c/apps/${_app_name}_*.c"
|
||||
"${CMAKE_SOURCE_DIR}/cleonos/c/apps/${_app_name}/*.c"
|
||||
)
|
||||
set(_app_common_objects ${USER_COMMON_OBJECTS})
|
||||
|
||||
if(_app_name STREQUAL "doom")
|
||||
foreach(_doom_src IN LISTS DOOMGENERIC_APP_SOURCES)
|
||||
list(APPEND _app_specific_abs "${CMAKE_SOURCE_DIR}/${_doom_src}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
list(FIND USER_SHELL_COMMAND_APPS "${_app_name}" _shell_cmd_idx)
|
||||
if(NOT _shell_cmd_idx EQUAL -1)
|
||||
file(GLOB _shell_cmd_shared_abs CONFIGURE_DEPENDS
|
||||
"${CMAKE_SOURCE_DIR}/cleonos/c/apps/shell/*.c"
|
||||
)
|
||||
list(APPEND _app_specific_abs ${_shell_cmd_shared_abs})
|
||||
list(APPEND _app_specific_abs "${CMAKE_SOURCE_DIR}/cleonos/c/apps/cmd_runtime.c")
|
||||
endif()
|
||||
foreach(_extra_abs IN LISTS _app_specific_abs)
|
||||
file(RELATIVE_PATH _extra_rel "${CMAKE_SOURCE_DIR}" "${_extra_abs}")
|
||||
@@ -395,7 +687,11 @@ foreach(SRC IN LISTS USER_APP_MAIN_SOURCES)
|
||||
continue()
|
||||
endif()
|
||||
|
||||
add_user_c_object("${_extra_rel}" _extra_obj)
|
||||
if(_app_name STREQUAL "doom")
|
||||
add_user_c_object_doom("${_extra_rel}" _extra_obj)
|
||||
else()
|
||||
add_user_c_object("${_extra_rel}" _extra_obj)
|
||||
endif()
|
||||
list(APPEND _app_specific_objs "${_extra_obj}")
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES _app_specific_objs)
|
||||
@@ -404,8 +700,8 @@ foreach(SRC IN LISTS USER_APP_MAIN_SOURCES)
|
||||
add_custom_command(
|
||||
OUTPUT "${_app_out}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${USER_APP_DIR}"
|
||||
COMMAND ${USER_LD} ${USER_LDFLAGS} -o "${_app_out}" ${USER_COMMON_OBJECTS} "${_user_obj}" ${_app_specific_objs} "${USER_RUST_LIB}"
|
||||
DEPENDS ${USER_COMMON_OBJECTS} "${_user_obj}" ${_app_specific_objs} "${USER_RUST_LIB}" "${USER_LINKER_SCRIPT}"
|
||||
COMMAND ${USER_LD} ${USER_LDFLAGS} -o "${_app_out}" ${_app_common_objects} "${_user_obj}" ${_app_specific_objs} "${USER_RUST_LIB}"
|
||||
DEPENDS ${_app_common_objects} "${_user_obj}" ${_app_specific_objs} "${USER_RUST_LIB}" "${USER_LINKER_SCRIPT}"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
@@ -422,6 +718,20 @@ endforeach()
|
||||
foreach(SRC IN LISTS USER_APP_KMAIN_SOURCES)
|
||||
get_filename_component(_stem "${SRC}" NAME_WE)
|
||||
string(REGEX REPLACE "_kmain$" "" _app_name "${_stem}")
|
||||
string(TOUPPER "${_app_name}" _app_name_upper)
|
||||
string(REGEX REPLACE "[^A-Z0-9]" "_" _app_name_key "${_app_name_upper}")
|
||||
set(_app_enabled_var "CLEONOS_USER_APP_${_app_name_key}")
|
||||
|
||||
if(NOT DEFINED ${_app_enabled_var})
|
||||
set(${_app_enabled_var} ON CACHE BOOL "Build user app ${_app_name}")
|
||||
else()
|
||||
set(${_app_enabled_var} ${${_app_enabled_var}} CACHE BOOL "Build user app ${_app_name}" FORCE)
|
||||
endif()
|
||||
|
||||
if(NOT ${_app_enabled_var})
|
||||
cl_log_info("menuconfig: skip disabled user app ${_app_name}")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
list(FIND USER_APP_NAMES "${_app_name}" _dup_name_idx)
|
||||
if(NOT _dup_name_idx EQUAL -1)
|
||||
@@ -484,10 +794,11 @@ add_custom_command(
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -rf "${RAMDISK_ROOT}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${RAMDISK_ROOT}"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/ramdisk" "${RAMDISK_ROOT}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${RAMDISK_ROOT}/system" "${RAMDISK_ROOT}/shell" "${RAMDISK_ROOT}/driver"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${RAMDISK_ROOT}/system" "${RAMDISK_ROOT}/shell" "${RAMDISK_ROOT}/driver" "${RAMDISK_ROOT}/dev"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${KERNEL_SYMBOLS_FILE}" "${RAMDISK_ROOT}/system/kernel.sym"
|
||||
${RAMDISK_COPY_COMMANDS}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch "${RAMDISK_ROOT_STAMP}"
|
||||
DEPENDS ${RAMDISK_FILES} ${USER_APP_OUTPUTS}
|
||||
DEPENDS ${RAMDISK_FILES} ${USER_APP_OUTPUTS} "${KERNEL_SYMBOLS_FILE}"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
@@ -515,6 +826,8 @@ add_custom_target(setup-tools
|
||||
"-DOBJCOPY_TOOL=${OBJCOPY_FOR_TARGET}"
|
||||
"-DOBJDUMP_TOOL=${OBJDUMP_FOR_TARGET}"
|
||||
"-DREADELF_TOOL=${READELF_FOR_TARGET}"
|
||||
"-DNM_TOOL=${NM}"
|
||||
"-DADDR2LINE_TOOL=${ADDR2LINE}"
|
||||
"-DUSER_CC_TOOL=${USER_CC}"
|
||||
"-DUSER_LD_TOOL=${USER_LD}"
|
||||
"-DRUSTC_TOOL=${RUSTC}"
|
||||
@@ -558,13 +871,16 @@ add_custom_command(
|
||||
add_custom_command(
|
||||
OUTPUT "${ISO_IMAGE}"
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -rf "${ISO_ROOT}"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${ISO_ROOT}/boot/limine"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${ISO_ROOT}/boot/limine" "${ISO_ROOT}/EFI/BOOT"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${KERNEL_ELF}" "${ISO_ROOT}/boot/clks_kernel.elf"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${RAMDISK_IMAGE}" "${ISO_ROOT}/boot/cleonos_ramdisk.tar"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/configs/limine.conf" "${ISO_ROOT}/boot/limine/limine.conf"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/configs/limine.conf" "${ISO_ROOT}/EFI/BOOT/limine.conf"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/configs/limine.conf" "${ISO_ROOT}/limine.conf"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${LIMINE_BIN_DIR_ABS}/limine-bios.sys" "${ISO_ROOT}/boot/limine/limine-bios.sys"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${LIMINE_BIN_DIR_ABS}/limine-bios-cd.bin" "${ISO_ROOT}/boot/limine/limine-bios-cd.bin"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${LIMINE_BIN_DIR_ABS}/limine-uefi-cd.bin" "${ISO_ROOT}/boot/limine/limine-uefi-cd.bin"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${LIMINE_BIN_DIR_ABS}/BOOTX64.EFI" "${ISO_ROOT}/EFI/BOOT/BOOTX64.EFI"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_SOURCE_DIR}/build"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
"-DNO_COLOR=${NO_COLOR}"
|
||||
@@ -650,9 +966,32 @@ add_custom_target(clean-all
|
||||
-P "${CL_LOG_EMIT_SCRIPT}"
|
||||
)
|
||||
|
||||
find_package(Python3 COMPONENTS Interpreter QUIET)
|
||||
if(Python3_Interpreter_FOUND)
|
||||
add_custom_target(menuconfig
|
||||
COMMAND ${Python3_EXECUTABLE} "${CMAKE_SOURCE_DIR}/scripts/menuconfig.py"
|
||||
USES_TERMINAL
|
||||
)
|
||||
add_custom_target(menuconfig-gui
|
||||
COMMAND ${Python3_EXECUTABLE} "${CMAKE_SOURCE_DIR}/scripts/menuconfig.py" --gui
|
||||
USES_TERMINAL
|
||||
)
|
||||
else()
|
||||
add_custom_target(menuconfig
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "python3 not found; run scripts/menuconfig.py manually"
|
||||
USES_TERMINAL
|
||||
)
|
||||
add_custom_target(menuconfig-gui
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "python3 not found; run scripts/menuconfig.py --gui manually"
|
||||
USES_TERMINAL
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_target(cleonos-help
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "CLeonOS CMake build system (x86_64 only)"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " cmake -S . -B build-cmake"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " cmake --build build-cmake --target menuconfig"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " cmake --build build-cmake --target menuconfig-gui"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " cmake --build build-cmake --target setup"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " cmake --build build-cmake --target userapps"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " cmake --build build-cmake --target iso"
|
||||
|
||||
34
Makefile
34
Makefile
@@ -15,6 +15,9 @@ LIMINE_BIN_DIR ?=
|
||||
OBJCOPY_FOR_TARGET ?=
|
||||
OBJDUMP_FOR_TARGET ?=
|
||||
READELF_FOR_TARGET ?=
|
||||
PYTHON ?= python3
|
||||
MENUCONFIG_ARGS ?=
|
||||
MENUCONFIG_PRESET ?=
|
||||
|
||||
ifeq ($(strip $(CMAKE_GENERATOR)),)
|
||||
GEN_ARG :=
|
||||
@@ -23,6 +26,7 @@ GEN_ARG := -G "$(CMAKE_GENERATOR)"
|
||||
endif
|
||||
|
||||
CMAKE_PASSTHROUGH_ARGS :=
|
||||
MENUCONFIG_PRESET_ARG := $(if $(strip $(MENUCONFIG_PRESET)),--preset $(MENUCONFIG_PRESET),)
|
||||
|
||||
ifneq ($(strip $(LIMINE_SKIP_CONFIGURE)),)
|
||||
CMAKE_PASSTHROUGH_ARGS += -DLIMINE_SKIP_CONFIGURE=$(LIMINE_SKIP_CONFIGURE)
|
||||
@@ -49,7 +53,7 @@ ifneq ($(strip $(READELF_FOR_TARGET)),)
|
||||
CMAKE_PASSTHROUGH_ARGS += -DREADELF_FOR_TARGET=$(READELF_FOR_TARGET)
|
||||
endif
|
||||
|
||||
.PHONY: all configure reconfigure setup setup-tools setup-limine kernel userapps ramdisk-root ramdisk iso run debug clean clean-all help
|
||||
.PHONY: all configure reconfigure menuconfig menuconfig-gui setup setup-tools setup-limine kernel userapps ramdisk-root ramdisk iso run debug clean clean-all help
|
||||
|
||||
all: iso
|
||||
|
||||
@@ -60,6 +64,28 @@ reconfigure:
|
||||
> @rm -rf $(CMAKE_BUILD_DIR)
|
||||
> @$(MAKE) configure CMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) CMAKE_GENERATOR="$(CMAKE_GENERATOR)" CMAKE_EXTRA_ARGS="$(CMAKE_EXTRA_ARGS)" NO_COLOR="$(NO_COLOR)" LIMINE_SKIP_CONFIGURE="$(LIMINE_SKIP_CONFIGURE)" LIMINE_REF="$(LIMINE_REF)" LIMINE_REPO="$(LIMINE_REPO)" LIMINE_DIR="$(LIMINE_DIR)" LIMINE_BIN_DIR="$(LIMINE_BIN_DIR)" OBJCOPY_FOR_TARGET="$(OBJCOPY_FOR_TARGET)" OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)" READELF_FOR_TARGET="$(READELF_FOR_TARGET)"
|
||||
|
||||
menuconfig:
|
||||
> @if command -v $(PYTHON) >/dev/null 2>&1; then \
|
||||
> $(PYTHON) scripts/menuconfig.py $(MENUCONFIG_PRESET_ARG) $(MENUCONFIG_ARGS); \
|
||||
> elif command -v python >/dev/null 2>&1; then \
|
||||
> python scripts/menuconfig.py $(MENUCONFIG_PRESET_ARG) $(MENUCONFIG_ARGS); \
|
||||
> else \
|
||||
> echo "python3/python not found"; \
|
||||
> exit 1; \
|
||||
> fi
|
||||
> @$(MAKE) configure CMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) CMAKE_GENERATOR="$(CMAKE_GENERATOR)" CMAKE_EXTRA_ARGS="$(CMAKE_EXTRA_ARGS)" NO_COLOR="$(NO_COLOR)" LIMINE_SKIP_CONFIGURE="$(LIMINE_SKIP_CONFIGURE)" LIMINE_REF="$(LIMINE_REF)" LIMINE_REPO="$(LIMINE_REPO)" LIMINE_DIR="$(LIMINE_DIR)" LIMINE_BIN_DIR="$(LIMINE_BIN_DIR)" OBJCOPY_FOR_TARGET="$(OBJCOPY_FOR_TARGET)" OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)" READELF_FOR_TARGET="$(READELF_FOR_TARGET)"
|
||||
|
||||
menuconfig-gui:
|
||||
> @if command -v $(PYTHON) >/dev/null 2>&1; then \
|
||||
> $(PYTHON) scripts/menuconfig.py --gui $(MENUCONFIG_PRESET_ARG) $(MENUCONFIG_ARGS); \
|
||||
> elif command -v python >/dev/null 2>&1; then \
|
||||
> python scripts/menuconfig.py --gui $(MENUCONFIG_PRESET_ARG) $(MENUCONFIG_ARGS); \
|
||||
> else \
|
||||
> echo "python3/python not found"; \
|
||||
> exit 1; \
|
||||
> fi
|
||||
> @$(MAKE) configure CMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) CMAKE_GENERATOR="$(CMAKE_GENERATOR)" CMAKE_EXTRA_ARGS="$(CMAKE_EXTRA_ARGS)" NO_COLOR="$(NO_COLOR)" LIMINE_SKIP_CONFIGURE="$(LIMINE_SKIP_CONFIGURE)" LIMINE_REF="$(LIMINE_REF)" LIMINE_REPO="$(LIMINE_REPO)" LIMINE_DIR="$(LIMINE_DIR)" LIMINE_BIN_DIR="$(LIMINE_BIN_DIR)" OBJCOPY_FOR_TARGET="$(OBJCOPY_FOR_TARGET)" OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)" READELF_FOR_TARGET="$(READELF_FOR_TARGET)"
|
||||
|
||||
setup: configure
|
||||
> @$(CMAKE) --build $(CMAKE_BUILD_DIR) --target setup
|
||||
|
||||
@@ -107,6 +133,8 @@ clean-all:
|
||||
help:
|
||||
> @echo "CLeonOS (CMake-backed wrapper)"
|
||||
> @echo " make configure"
|
||||
> @echo " make menuconfig"
|
||||
> @echo " make menuconfig-gui"
|
||||
> @echo " make setup"
|
||||
> @echo " make userapps"
|
||||
> @echo " make iso"
|
||||
@@ -119,3 +147,7 @@ help:
|
||||
> @echo " make configure CMAKE_EXTRA_ARGS='-DLIMINE_SKIP_CONFIGURE=1 -DOBJCOPY_FOR_TARGET=objcopy'"
|
||||
> @echo "Direct passthrough is also supported:"
|
||||
> @echo " make run LIMINE_SKIP_CONFIGURE=1"
|
||||
> @echo "Preset examples:"
|
||||
> @echo " make menuconfig MENUCONFIG_PRESET=full"
|
||||
> @echo " make menuconfig MENUCONFIG_PRESET=minimal"
|
||||
> @echo " make menuconfig-gui MENUCONFIG_PRESET=dev"
|
||||
|
||||
125
README.md
Normal file
125
README.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# CLeonOS
|
||||
|
||||
[English](README.md) | [简体中文](README.zh-CN.md)
|
||||
|
||||
Experimental x86_64 operating system project with a C kernel, Rust-assisted runtime pieces, user-space ELF apps, and a stage-based development history.
|
||||
|
||||
## Highlights
|
||||
|
||||
- x86_64 kernel booted by Limine
|
||||
- RAM-disk VFS layout (`/system`, `/shell`, `/temp`, `/driver`)
|
||||
- Virtual TTY subsystem (multi TTY, ANSI handling, cursor, PSF font support)
|
||||
- Keyboard and mouse input stack, plus desktop mode on TTY2
|
||||
- User-space ELF app model with syscall ABI (`int 0x80`)
|
||||
- User shell with external command apps (`ls`, `cat`, `grep`, `mkdir`, `cp`, `mv`, `rm`, etc.)
|
||||
- Pipe and redirection support in user shell (`|`, `>`, `>>`)
|
||||
- Optional host-side CLeonOS-Wine runner (Python + Unicorn) in [`wine/`](wine)
|
||||
|
||||
## Repository Layout
|
||||
|
||||
```text
|
||||
.
|
||||
|- clks/ # Kernel sources (arch, drivers, scheduler, tty, syscall, ...)
|
||||
|- cleonos/ # Userland runtime, libc-like layer, user apps, Rust user library
|
||||
|- ramdisk/ # Static files copied into runtime ramdisk
|
||||
|- configs/ # Boot configuration (Limine)
|
||||
|- cmake/ # Shared CMake scripts (tool checks, logging, limine setup)
|
||||
|- docs/ # Stage documents and syscall reference
|
||||
|- wine/ # Host runner for CLeonOS user ELF (no full VM required)
|
||||
|- CMakeLists.txt # Main build definition
|
||||
|- Makefile # Developer-friendly wrapper around CMake targets
|
||||
```
|
||||
|
||||
## Build Requirements
|
||||
|
||||
Minimum required tools:
|
||||
|
||||
- `cmake` (>= 3.20)
|
||||
- `make`
|
||||
- `git`
|
||||
- `tar`
|
||||
- `xorriso`
|
||||
- `sh` (POSIX shell)
|
||||
- `rustc`
|
||||
- Kernel/user toolchain (resolved automatically with fallback):
|
||||
- kernel: `x86_64-elf-gcc`/`x86_64-elf-ld` (or fallback `gcc`/`clang` + `ld.lld`)
|
||||
- user: `cc` + `ld`
|
||||
|
||||
For building Limine from source, install extras such as `autoconf`, `automake`, `libtool`, `pkg-config`, `mtools`, and `nasm`.
|
||||
|
||||
For runtime:
|
||||
|
||||
- `qemu-system-x86_64` (for `make run` / `make debug`)
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
git clone <your-repo-url>
|
||||
cd cleonos
|
||||
git submodule update --init --recursive
|
||||
make run
|
||||
```
|
||||
|
||||
If you already have Limine artifacts and want to skip configure:
|
||||
|
||||
```bash
|
||||
make run LIMINE_SKIP_CONFIGURE=1
|
||||
```
|
||||
|
||||
## Common Targets
|
||||
|
||||
- `make setup` - check tools and prepare Limine
|
||||
- `make kernel` - build kernel ELF
|
||||
- `make userapps` - build user-space ELF apps
|
||||
- `make ramdisk` - package runtime ramdisk
|
||||
- `make iso` - build bootable ISO
|
||||
- `make run` - launch QEMU
|
||||
- `make debug` - launch QEMU with `-s -S` for GDB
|
||||
- `make clean` - clean `build/x86_64`
|
||||
- `make clean-all` - clean all build output
|
||||
|
||||
## Debugging (GDB)
|
||||
|
||||
Start debug VM:
|
||||
|
||||
```bash
|
||||
make debug
|
||||
```
|
||||
|
||||
Attach in another terminal:
|
||||
|
||||
```bash
|
||||
gdb build/x86_64/clks_kernel.elf
|
||||
(gdb) target remote :1234
|
||||
```
|
||||
|
||||
## User Shell Examples
|
||||
|
||||
```sh
|
||||
help
|
||||
ls /shell
|
||||
cat /shell/init.cmd
|
||||
grep -n exec /shell/init.cmd
|
||||
cat /shell/init.cmd | grep -n exec
|
||||
ls /shell > /temp/shell_list.txt
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
- Stage index: [`docs/README.md`](docs/README.md)
|
||||
- Syscall ABI reference: [`docs/syscall.md`](docs/syscall.md)
|
||||
|
||||
## CI
|
||||
|
||||
GitHub Actions workflow [`build-os.yml`](.github/workflows/build-os.yml) builds the OS ISO on push and pull request, and uploads the ISO as an artifact.
|
||||
|
||||
## Contributing
|
||||
|
||||
1. Fork and create a feature branch.
|
||||
2. Keep changes stage-oriented and update docs when behavior changes.
|
||||
3. Run at least `make iso` before opening a PR.
|
||||
4. Include boot log snippets or screenshots for kernel/user visible changes.
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0. See [`License`](License).
|
||||
125
README.zh-CN.md
Normal file
125
README.zh-CN.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# CLeonOS
|
||||
|
||||
[English](README.md) | [简体中文](README.zh-CN.md)
|
||||
|
||||
一个实验性的 x86_64 操作系统项目,包含 C 内核、Rust 辅助运行时代码、用户态 ELF 应用,以及按 Stage 演进的开发历史。
|
||||
|
||||
## 项目特性
|
||||
|
||||
- 基于 Limine 启动的 x86_64 内核
|
||||
- RAM-disk VFS 目录布局(`/system`、`/shell`、`/temp`、`/driver`)
|
||||
- 虚拟 TTY 子系统(多 TTY、ANSI、光标、PSF 字体)
|
||||
- 键盘/鼠标输入栈,TTY2 提供桌面模式
|
||||
- 用户态 ELF 应用模型,syscall ABI 使用 `int 0x80`
|
||||
- 用户 Shell + 外部命令 ELF(`ls`、`cat`、`grep`、`mkdir`、`cp`、`mv`、`rm` 等)
|
||||
- Shell 管道与重定向(`|`、`>`、`>>`)
|
||||
- 可选主机侧 CLeonOS-Wine 运行器(Python + Unicorn),位于 [`wine/`](wine)
|
||||
|
||||
## 仓库结构
|
||||
|
||||
```text
|
||||
.
|
||||
|- clks/ # 内核源码(架构、驱动、调度、TTY、syscall 等)
|
||||
|- cleonos/ # 用户态运行时、基础库、用户应用、Rust 用户库
|
||||
|- ramdisk/ # 运行时 ramdisk 的静态文件
|
||||
|- configs/ # 启动配置(Limine)
|
||||
|- cmake/ # CMake 公共脚本(工具检查、日志、limine 初始化)
|
||||
|- docs/ # Stage 文档与 syscall 文档
|
||||
|- wine/ # 主机侧用户 ELF 运行器(无需完整虚拟机)
|
||||
|- CMakeLists.txt # 主构建定义
|
||||
|- Makefile # 面向开发者的 CMake 包装入口
|
||||
```
|
||||
|
||||
## 构建依赖
|
||||
|
||||
最低需要:
|
||||
|
||||
- `cmake`(>= 3.20)
|
||||
- `make`
|
||||
- `git`
|
||||
- `tar`
|
||||
- `xorriso`
|
||||
- `sh`(POSIX shell)
|
||||
- `rustc`
|
||||
- 内核/用户工具链(会自动回退查找):
|
||||
- 内核:`x86_64-elf-gcc` / `x86_64-elf-ld`(可回退到 `gcc`/`clang` + `ld.lld`)
|
||||
- 用户态:`cc` + `ld`
|
||||
|
||||
如需从源码构建 Limine,请安装额外依赖:`autoconf`、`automake`、`libtool`、`pkg-config`、`mtools`、`nasm`。
|
||||
|
||||
运行时还需要:
|
||||
|
||||
- `qemu-system-x86_64`(用于 `make run` / `make debug`)
|
||||
|
||||
## 快速开始
|
||||
|
||||
```bash
|
||||
git clone <your-repo-url>
|
||||
cd cleonos
|
||||
git submodule update --init --recursive
|
||||
make run
|
||||
```
|
||||
|
||||
如果你已经准备好 Limine 产物,可跳过 configure:
|
||||
|
||||
```bash
|
||||
make run LIMINE_SKIP_CONFIGURE=1
|
||||
```
|
||||
|
||||
## 常用目标
|
||||
|
||||
- `make setup` - 检查工具并准备 Limine
|
||||
- `make kernel` - 构建内核 ELF
|
||||
- `make userapps` - 构建用户态 ELF 应用
|
||||
- `make ramdisk` - 打包运行时 ramdisk
|
||||
- `make iso` - 生成可启动 ISO
|
||||
- `make run` - 启动 QEMU
|
||||
- `make debug` - 以 `-s -S` 启动 QEMU 供 GDB 附加
|
||||
- `make clean` - 清理 `build/x86_64`
|
||||
- `make clean-all` - 清理全部构建产物
|
||||
|
||||
## 调试(GDB)
|
||||
|
||||
先启动调试 VM:
|
||||
|
||||
```bash
|
||||
make debug
|
||||
```
|
||||
|
||||
再在另一个终端连接:
|
||||
|
||||
```bash
|
||||
gdb build/x86_64/clks_kernel.elf
|
||||
(gdb) target remote :1234
|
||||
```
|
||||
|
||||
## User Shell 示例
|
||||
|
||||
```sh
|
||||
help
|
||||
ls /shell
|
||||
cat /shell/init.cmd
|
||||
grep -n exec /shell/init.cmd
|
||||
cat /shell/init.cmd | grep -n exec
|
||||
ls /shell > /temp/shell_list.txt
|
||||
```
|
||||
|
||||
## 文档
|
||||
|
||||
- Stage 索引:[`docs/README.md`](docs/README.md)
|
||||
- Syscall ABI 文档:[`docs/syscall.md`](docs/syscall.md)
|
||||
|
||||
## CI
|
||||
|
||||
GitHub Actions 工作流 [`build-os.yml`](.github/workflows/build-os.yml) 会在 push/PR 时自动构建 ISO,并上传为 artifact。
|
||||
|
||||
## 贡献指南
|
||||
|
||||
1. Fork 仓库并创建功能分支。
|
||||
2. 尽量按 Stage 组织改动,并同步更新文档。
|
||||
3. 提交 PR 前至少执行一次 `make iso`。
|
||||
4. 涉及可见行为变化时,附上启动日志片段或截图。
|
||||
|
||||
## 许可证
|
||||
|
||||
Apache-2.0。详见 [`License`](License)。
|
||||
@@ -1,6 +1,53 @@
|
||||
#include "shell/shell_internal.h"
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("ansi");
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_ansi(void) {
|
||||
ush_writeln("\x1B[1;36mansi color demo\x1B[0m");
|
||||
ush_writeln(" \x1B[30mblack\x1B[0m \x1B[31mred\x1B[0m \x1B[32mgreen\x1B[0m \x1B[33myellow\x1B[0m");
|
||||
ush_writeln(" \x1B[34mblue\x1B[0m \x1B[35mmagenta\x1B[0m \x1B[36mcyan\x1B[0m \x1B[37mwhite\x1B[0m");
|
||||
ush_writeln(" \x1B[90mbright-black\x1B[0m \x1B[91mbright-red\x1B[0m \x1B[92mbright-green\x1B[0m "
|
||||
"\x1B[93mbright-yellow\x1B[0m");
|
||||
ush_writeln(" \x1B[94mbright-blue\x1B[0m \x1B[95mbright-magenta\x1B[0m \x1B[96mbright-cyan\x1B[0m "
|
||||
"\x1B[97mbright-white\x1B[0m");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "ansi") != 0) {
|
||||
has_context = 1;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_ansi();
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
177
cleonos/c/apps/ansitest_main.c
Normal file
177
cleonos/c/apps/ansitest_main.c
Normal file
@@ -0,0 +1,177 @@
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_ansi(void) {
|
||||
ush_writeln("\x1B[1;36mansi color demo\x1B[0m");
|
||||
ush_writeln(" \x1B[30mblack\x1B[0m \x1B[31mred\x1B[0m \x1B[32mgreen\x1B[0m \x1B[33myellow\x1B[0m");
|
||||
ush_writeln(" \x1B[34mblue\x1B[0m \x1B[35mmagenta\x1B[0m \x1B[36mcyan\x1B[0m \x1B[37mwhite\x1B[0m");
|
||||
ush_writeln(" \x1B[90mbright-black\x1B[0m \x1B[91mbright-red\x1B[0m \x1B[92mbright-green\x1B[0m "
|
||||
"\x1B[93mbright-yellow\x1B[0m");
|
||||
ush_writeln(" \x1B[94mbright-blue\x1B[0m \x1B[95mbright-magenta\x1B[0m \x1B[96mbright-cyan\x1B[0m "
|
||||
"\x1B[97mbright-white\x1B[0m");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static u64 ush_ansitest_u64_to_dec(char *out, u64 out_size, u64 value) {
|
||||
char rev[10];
|
||||
u64 digits = 0ULL;
|
||||
u64 i;
|
||||
|
||||
if (out == (char *)0 || out_size == 0ULL) {
|
||||
return 0ULL;
|
||||
}
|
||||
|
||||
if (value == 0U) {
|
||||
if (out_size < 2ULL) {
|
||||
return 0ULL;
|
||||
}
|
||||
|
||||
out[0] = '0';
|
||||
out[1] = '\0';
|
||||
return 1ULL;
|
||||
}
|
||||
|
||||
while (value > 0U && digits < (u64)sizeof(rev)) {
|
||||
rev[digits++] = (char)('0' + (value % 10U));
|
||||
value /= 10U;
|
||||
}
|
||||
|
||||
if (digits + 1ULL > out_size) {
|
||||
out[0] = '\0';
|
||||
return 0ULL;
|
||||
}
|
||||
|
||||
for (i = 0ULL; i < digits; i++) {
|
||||
out[i] = rev[digits - 1ULL - i];
|
||||
}
|
||||
|
||||
out[digits] = '\0';
|
||||
return digits;
|
||||
}
|
||||
|
||||
static void ush_ansitest_emit_bg256(u64 index) {
|
||||
char num[4];
|
||||
char seq[24];
|
||||
u64 digits;
|
||||
u64 p = 0ULL;
|
||||
u64 i;
|
||||
|
||||
if (index > 255U) {
|
||||
index = 255U;
|
||||
}
|
||||
|
||||
digits = ush_ansitest_u64_to_dec(num, (u64)sizeof(num), index);
|
||||
if (digits == 0ULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
seq[p++] = '\x1B';
|
||||
seq[p++] = '[';
|
||||
seq[p++] = '4';
|
||||
seq[p++] = '8';
|
||||
seq[p++] = ';';
|
||||
seq[p++] = '5';
|
||||
seq[p++] = ';';
|
||||
|
||||
for (i = 0ULL; i < digits && p + 1ULL < (u64)sizeof(seq); i++) {
|
||||
seq[p++] = num[i];
|
||||
}
|
||||
|
||||
if (p + 7ULL >= (u64)sizeof(seq)) {
|
||||
return;
|
||||
}
|
||||
|
||||
seq[p++] = 'm';
|
||||
seq[p++] = ' ';
|
||||
seq[p++] = ' ';
|
||||
seq[p++] = '\x1B';
|
||||
seq[p++] = '[';
|
||||
seq[p++] = '0';
|
||||
seq[p++] = 'm';
|
||||
seq[p] = '\0';
|
||||
|
||||
ush_write(seq);
|
||||
}
|
||||
|
||||
static int ush_cmd_ansitest(void) {
|
||||
u64 i;
|
||||
|
||||
ush_writeln("\x1B[1;96mANSI test suite\x1B[0m");
|
||||
ush_writeln("styles: \x1B[1mbold\x1B[0m \x1B[7minverse\x1B[0m \x1B[4munderline\x1B[0m");
|
||||
ush_writeln("16-color demo:");
|
||||
(void)ush_cmd_ansi();
|
||||
|
||||
ush_writeln("256-color palette (0..255):");
|
||||
for (i = 0ULL; i < 256ULL; i++) {
|
||||
ush_ansitest_emit_bg256(i);
|
||||
if ((i % 32ULL) == 31ULL) {
|
||||
ush_write_char('\n');
|
||||
}
|
||||
}
|
||||
ush_write_char('\n');
|
||||
|
||||
ush_writeln("truecolor demo:");
|
||||
ush_writeln(" \x1B[38;2;255;64;64mRGB(255,64,64)\x1B[0m \x1B[38;2;64;255;64mRGB(64,255,64)\x1B[0m "
|
||||
"\x1B[38;2;64;128;255mRGB(64,128,255)\x1B[0m");
|
||||
|
||||
ush_writeln("cursor control demo:");
|
||||
ush_write(" 0123456789");
|
||||
ush_write("\x1B[5D");
|
||||
ush_write("\x1B[93m<OK>\x1B[0m");
|
||||
ush_write_char('\n');
|
||||
|
||||
ush_write(" save");
|
||||
ush_write("\x1B[s");
|
||||
ush_write("....");
|
||||
ush_write("\x1B[u");
|
||||
ush_write("\x1B[92m<restore>\x1B[0m");
|
||||
ush_write_char('\n');
|
||||
|
||||
ush_writeln("erase-line demo:");
|
||||
ush_write(" left|right-to-clear");
|
||||
ush_write("\x1B[14D\x1B[K");
|
||||
ush_write_char('\n');
|
||||
|
||||
ush_writeln("ansitest done");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "ansitest") != 0) {
|
||||
has_context = 1;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_ansitest();
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
@@ -1,6 +1,89 @@
|
||||
#include "shell/shell_internal.h"
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_append(const ush_state *sh, const char *arg) {
|
||||
char path_arg[USH_PATH_MAX];
|
||||
char abs_path[USH_PATH_MAX];
|
||||
const char *payload = (const char *)0;
|
||||
u64 payload_len;
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("append");
|
||||
if (arg == (const char *)0 || arg[0] == '\0') {
|
||||
ush_writeln("append: usage append <file> <text>");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_split_first_and_rest(arg, path_arg, (u64)sizeof(path_arg), &payload) == 0) {
|
||||
ush_writeln("append: usage append <file> <text>");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_resolve_path(sh, path_arg, abs_path, (u64)sizeof(abs_path)) == 0) {
|
||||
ush_writeln("append: invalid path");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_path_is_under_temp(abs_path) == 0) {
|
||||
ush_writeln("append: target must be under /temp");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (payload == (const char *)0 || payload[0] == '\0') {
|
||||
if (ush_pipeline_stdin_text == (const char *)0) {
|
||||
ush_writeln("append: usage append <file> <text>");
|
||||
return 0;
|
||||
}
|
||||
payload = ush_pipeline_stdin_text;
|
||||
payload_len = ush_pipeline_stdin_len;
|
||||
} else {
|
||||
payload_len = ush_strlen(payload);
|
||||
}
|
||||
|
||||
if (cleonos_sys_fs_append(abs_path, payload, payload_len) == 0ULL) {
|
||||
ush_writeln("append: failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "append") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_append(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
61
cleonos/c/apps/args_main.c
Normal file
61
cleonos/c/apps/args_main.c
Normal file
@@ -0,0 +1,61 @@
|
||||
#include "cmd_runtime.h"
|
||||
|
||||
static void ush_args_write_u64_dec(u64 value) {
|
||||
char tmp[32];
|
||||
u64 len = 0ULL;
|
||||
|
||||
if (value == 0ULL) {
|
||||
ush_write_char('0');
|
||||
return;
|
||||
}
|
||||
|
||||
while (value > 0ULL && len < (u64)sizeof(tmp)) {
|
||||
tmp[len++] = (char)('0' + (value % 10ULL));
|
||||
value /= 10ULL;
|
||||
}
|
||||
|
||||
while (len > 0ULL) {
|
||||
len--;
|
||||
ush_write_char(tmp[len]);
|
||||
}
|
||||
}
|
||||
|
||||
int cleonos_app_main(int argc, char **argv, char **envp) {
|
||||
int i;
|
||||
int env_count = 0;
|
||||
|
||||
ush_write("argc=");
|
||||
ush_args_write_u64_dec((u64)((argc >= 0) ? argc : 0));
|
||||
ush_write_char('\n');
|
||||
|
||||
for (i = 0; i < argc; i++) {
|
||||
ush_write("argv[");
|
||||
ush_args_write_u64_dec((u64)i);
|
||||
ush_write("]=");
|
||||
|
||||
if (argv != (char **)0 && argv[i] != (char *)0) {
|
||||
ush_writeln(argv[i]);
|
||||
} else {
|
||||
ush_writeln("(null)");
|
||||
}
|
||||
}
|
||||
|
||||
if (envp != (char **)0) {
|
||||
while (envp[env_count] != (char *)0 && env_count < 64) {
|
||||
env_count++;
|
||||
}
|
||||
}
|
||||
|
||||
ush_write("envc=");
|
||||
ush_args_write_u64_dec((u64)env_count);
|
||||
ush_write_char('\n');
|
||||
|
||||
for (i = 0; i < env_count; i++) {
|
||||
ush_write("env[");
|
||||
ush_args_write_u64_dec((u64)i);
|
||||
ush_write("]=");
|
||||
ush_writeln(envp[i]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
126
cleonos/c/apps/bg_main.c
Normal file
126
cleonos/c/apps/bg_main.c
Normal file
@@ -0,0 +1,126 @@
|
||||
#include "cmd_runtime.h"
|
||||
|
||||
static int ush_bg_resume_pid(const char *pid_text) {
|
||||
u64 pid = 0ULL;
|
||||
u64 ret;
|
||||
|
||||
if (pid_text == (const char *)0 || ush_parse_u64_dec(pid_text, &pid) == 0 || pid == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = cleonos_sys_proc_kill(pid, CLEONOS_SIGCONT);
|
||||
|
||||
if (ret == (u64)-1) {
|
||||
ush_writeln("bg: pid not found");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ret == 0ULL) {
|
||||
ush_writeln("bg: target cannot be resumed right now");
|
||||
return 1;
|
||||
}
|
||||
|
||||
ush_write("bg: resumed [");
|
||||
ush_write_hex_u64(pid);
|
||||
ush_writeln("]");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ush_cmd_bg(const ush_state *sh, const char *arg) {
|
||||
char target[USH_PATH_MAX];
|
||||
char argv_line[USH_ARG_MAX];
|
||||
char env_line[USH_PATH_MAX + 32ULL];
|
||||
const char *rest = "";
|
||||
char path[USH_PATH_MAX];
|
||||
u64 pid;
|
||||
|
||||
if (sh == (const ush_state *)0 || arg == (const char *)0 || arg[0] == '\0') {
|
||||
ush_writeln("bg: usage bg <path|name> [args...]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_split_first_and_rest(arg, target, (u64)sizeof(target), &rest) == 0) {
|
||||
ush_writeln("bg: usage bg <path|name> [args...]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
argv_line[0] = '\0';
|
||||
if (rest != (const char *)0 && rest[0] != '\0') {
|
||||
ush_copy(argv_line, (u64)sizeof(argv_line), rest);
|
||||
}
|
||||
|
||||
if (argv_line[0] == '\0' && ush_bg_resume_pid(target) != 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ush_resolve_exec_path(sh, target, path, (u64)sizeof(path)) == 0) {
|
||||
ush_writeln("bg: invalid target");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_path_is_under_system(path) != 0) {
|
||||
ush_writeln("bg: /system/*.elf is kernel-mode (KELF), not user-exec");
|
||||
return 0;
|
||||
}
|
||||
|
||||
env_line[0] = '\0';
|
||||
ush_copy(env_line, (u64)sizeof(env_line), "PWD=");
|
||||
ush_copy(env_line + 4, (u64)(sizeof(env_line) - 4ULL), sh->cwd);
|
||||
|
||||
pid = cleonos_sys_spawn_pathv(path, argv_line, env_line);
|
||||
|
||||
if (pid == (u64)-1) {
|
||||
ush_writeln("bg: request failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
ush_write("[");
|
||||
ush_write_hex_u64(pid);
|
||||
ush_write("] ");
|
||||
ush_writeln(path);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "bg") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_bg(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
@@ -1,6 +1,106 @@
|
||||
#include "shell/shell_internal.h"
|
||||
#include "cmd_runtime.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("cat");
|
||||
static int ush_cmd_cat(const ush_state *sh, const char *arg) {
|
||||
char path[USH_PATH_MAX];
|
||||
char buf[1024];
|
||||
u64 fd;
|
||||
|
||||
if (arg == (const char *)0 || arg[0] == '\0') {
|
||||
if (ush_pipeline_stdin_text != (const char *)0) {
|
||||
(void)fputs(ush_pipeline_stdin_text, 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
(void)puts("cat: file path required");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_resolve_path(sh, arg, path, (u64)sizeof(path)) == 0) {
|
||||
(void)puts("cat: invalid path");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cleonos_sys_fs_stat_type(path) != 1ULL) {
|
||||
(void)puts("cat: file not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
fd = cleonos_sys_fd_open(path, CLEONOS_O_RDONLY, 0ULL);
|
||||
if (fd == (u64)-1) {
|
||||
(void)puts("cat: open failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
u64 got = cleonos_sys_fd_read(fd, buf, (u64)sizeof(buf));
|
||||
u64 written_total = 0ULL;
|
||||
|
||||
if (got == (u64)-1) {
|
||||
(void)cleonos_sys_fd_close(fd);
|
||||
(void)puts("cat: read failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (got == 0ULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
while (written_total < got) {
|
||||
u64 written = cleonos_sys_fd_write(1ULL, buf + written_total, got - written_total);
|
||||
if (written == (u64)-1 || written == 0ULL) {
|
||||
(void)cleonos_sys_fd_close(fd);
|
||||
(void)puts("cat: write failed");
|
||||
return 0;
|
||||
}
|
||||
written_total += written;
|
||||
}
|
||||
}
|
||||
|
||||
(void)cleonos_sys_fd_close(fd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "cat") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_cat(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,66 @@
|
||||
#include "shell/shell_internal.h"
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_cd(ush_state *sh, const char *arg) {
|
||||
const char *target = arg;
|
||||
char path[USH_PATH_MAX];
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("cd");
|
||||
if (target == (const char *)0 || target[0] == '\0') {
|
||||
target = "/";
|
||||
}
|
||||
|
||||
if (ush_resolve_path(sh, target, path, (u64)sizeof(path)) == 0) {
|
||||
ush_writeln("cd: invalid path");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cleonos_sys_fs_stat_type(path) != 2ULL) {
|
||||
ush_writeln("cd: directory not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
ush_copy(sh->cwd, (u64)sizeof(sh->cwd), path);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "cd") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_cd(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,47 @@
|
||||
#include "shell/shell_internal.h"
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("clear");
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_clear(void) {
|
||||
ush_write("\x1B[2J\x1B[H");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "clear") != 0) {
|
||||
has_context = 1;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_clear();
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
597
cleonos/c/apps/cmd_runtime.c
Normal file
597
cleonos/c/apps/cmd_runtime.c
Normal file
@@ -0,0 +1,597 @@
|
||||
#include "cmd_runtime.h"
|
||||
|
||||
const char *ush_pipeline_stdin_text = (const char *)0;
|
||||
u64 ush_pipeline_stdin_len = 0ULL;
|
||||
static char ush_pipeline_stdin_buf[USH_COPY_MAX + 1U];
|
||||
|
||||
static int ush_cmd_runtime_has_prefix(const char *text, const char *prefix) {
|
||||
u64 i = 0ULL;
|
||||
|
||||
if (text == (const char *)0 || prefix == (const char *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (prefix[i] != '\0') {
|
||||
if (text[i] != prefix[i]) {
|
||||
return 0;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ush_cmd_runtime_stdin_pipe_enabled(char **envp) {
|
||||
u64 i = 0ULL;
|
||||
|
||||
if (envp == (char **)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (envp[i] != (char *)0) {
|
||||
const char *entry = envp[i];
|
||||
|
||||
if (ush_cmd_runtime_has_prefix(entry, "USH_STDIN_MODE=PIPE") != 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ush_cmd_runtime_capture_stdin_pipe(void) {
|
||||
u64 total = 0ULL;
|
||||
int truncated = 0;
|
||||
char drain[256];
|
||||
|
||||
for (;;) {
|
||||
u64 got;
|
||||
|
||||
if (total < (u64)USH_COPY_MAX) {
|
||||
got = cleonos_sys_fd_read(0ULL, ush_pipeline_stdin_buf + total, (u64)USH_COPY_MAX - total);
|
||||
} else {
|
||||
got = cleonos_sys_fd_read(0ULL, drain, (u64)sizeof(drain));
|
||||
truncated = 1;
|
||||
}
|
||||
|
||||
if (got == (u64)-1 || got == 0ULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (total < (u64)USH_COPY_MAX) {
|
||||
total += got;
|
||||
}
|
||||
}
|
||||
|
||||
ush_pipeline_stdin_buf[total] = '\0';
|
||||
ush_pipeline_stdin_text = ush_pipeline_stdin_buf;
|
||||
ush_pipeline_stdin_len = total;
|
||||
|
||||
if (truncated != 0) {
|
||||
ush_writeln("[pipe] input truncated");
|
||||
}
|
||||
}
|
||||
|
||||
void cleonos_cmd_runtime_pre_main(char **envp) {
|
||||
ush_pipeline_stdin_text = (const char *)0;
|
||||
ush_pipeline_stdin_len = 0ULL;
|
||||
ush_pipeline_stdin_buf[0] = '\0';
|
||||
|
||||
if (ush_cmd_runtime_stdin_pipe_enabled(envp) != 0) {
|
||||
ush_cmd_runtime_capture_stdin_pipe();
|
||||
}
|
||||
}
|
||||
|
||||
void ush_zero(void *ptr, u64 size) {
|
||||
if (ptr == (void *)0 || size == 0ULL) {
|
||||
return;
|
||||
}
|
||||
(void)memset(ptr, 0, (size_t)size);
|
||||
}
|
||||
|
||||
void ush_init_state(ush_state *sh) {
|
||||
if (sh == (ush_state *)0) {
|
||||
return;
|
||||
}
|
||||
|
||||
ush_zero(sh, (u64)sizeof(*sh));
|
||||
ush_copy(sh->cwd, (u64)sizeof(sh->cwd), "/");
|
||||
sh->history_nav = -1;
|
||||
}
|
||||
|
||||
u64 ush_strlen(const char *str) {
|
||||
return (str == (const char *)0) ? 0ULL : (u64)strlen(str);
|
||||
}
|
||||
|
||||
int ush_streq(const char *left, const char *right) {
|
||||
if (left == (const char *)0 || right == (const char *)0) {
|
||||
return 0;
|
||||
}
|
||||
return (strcmp(left, right) == 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
int ush_is_space(char ch) {
|
||||
return (isspace((unsigned char)ch) != 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
int ush_is_printable(char ch) {
|
||||
return (isprint((unsigned char)ch) != 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
int ush_has_suffix(const char *name, const char *suffix) {
|
||||
size_t name_len;
|
||||
size_t suffix_len;
|
||||
|
||||
if (name == (const char *)0 || suffix == (const char *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
name_len = strlen(name);
|
||||
suffix_len = strlen(suffix);
|
||||
|
||||
if (suffix_len > name_len) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (strncmp(name + (name_len - suffix_len), suffix, suffix_len) == 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
int ush_contains_char(const char *text, char needle) {
|
||||
if (text == (const char *)0) {
|
||||
return 0;
|
||||
}
|
||||
return (strchr(text, (int)needle) != (char *)0) ? 1 : 0;
|
||||
}
|
||||
|
||||
int ush_parse_u64_dec(const char *text, u64 *out_value) {
|
||||
u64 value = 0ULL;
|
||||
u64 i = 0ULL;
|
||||
|
||||
if (text == (const char *)0 || out_value == (u64 *)0 || text[0] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (text[i] != '\0') {
|
||||
u64 digit;
|
||||
|
||||
if (isdigit((unsigned char)text[i]) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
digit = (u64)(text[i] - '0');
|
||||
|
||||
if (value > ((0xFFFFFFFFFFFFFFFFULL - digit) / 10ULL)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
value = (value * 10ULL) + digit;
|
||||
i++;
|
||||
}
|
||||
|
||||
*out_value = value;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void ush_copy(char *dst, u64 dst_size, const char *src) {
|
||||
if (dst == (char *)0 || src == (const char *)0 || dst_size == 0ULL) {
|
||||
return;
|
||||
}
|
||||
(void)strncpy(dst, src, (size_t)(dst_size - 1ULL));
|
||||
dst[dst_size - 1ULL] = '\0';
|
||||
}
|
||||
|
||||
void ush_trim_line(char *line) {
|
||||
size_t start = 0U;
|
||||
size_t len;
|
||||
|
||||
if (line == (char *)0) {
|
||||
return;
|
||||
}
|
||||
|
||||
while (line[start] != '\0' && isspace((unsigned char)line[start]) != 0) {
|
||||
start++;
|
||||
}
|
||||
|
||||
if (start > 0U) {
|
||||
size_t remain = strlen(line + start) + 1U;
|
||||
(void)memmove(line, line + start, remain);
|
||||
}
|
||||
|
||||
len = strlen(line);
|
||||
|
||||
while (len > 0U && isspace((unsigned char)line[len - 1U]) != 0) {
|
||||
line[len - 1U] = '\0';
|
||||
len--;
|
||||
}
|
||||
}
|
||||
|
||||
void ush_parse_line(const char *line, char *out_cmd, u64 cmd_size, char *out_arg, u64 arg_size) {
|
||||
u64 i = 0ULL;
|
||||
u64 cmd_pos = 0ULL;
|
||||
u64 arg_pos = 0ULL;
|
||||
|
||||
if (line == (const char *)0 || out_cmd == (char *)0 || out_arg == (char *)0) {
|
||||
return;
|
||||
}
|
||||
|
||||
out_cmd[0] = '\0';
|
||||
out_arg[0] = '\0';
|
||||
|
||||
while (line[i] != '\0' && ush_is_space(line[i]) != 0) {
|
||||
i++;
|
||||
}
|
||||
|
||||
while (line[i] != '\0' && ush_is_space(line[i]) == 0) {
|
||||
if (cmd_pos + 1ULL < cmd_size) {
|
||||
out_cmd[cmd_pos++] = line[i];
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
out_cmd[cmd_pos] = '\0';
|
||||
|
||||
while (line[i] != '\0' && ush_is_space(line[i]) != 0) {
|
||||
i++;
|
||||
}
|
||||
|
||||
while (line[i] != '\0') {
|
||||
if (arg_pos + 1ULL < arg_size) {
|
||||
out_arg[arg_pos++] = line[i];
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
out_arg[arg_pos] = '\0';
|
||||
}
|
||||
|
||||
void ush_write(const char *text) {
|
||||
if (text == (const char *)0) {
|
||||
return;
|
||||
}
|
||||
(void)fputs(text, 1);
|
||||
}
|
||||
|
||||
void ush_write_char(char ch) {
|
||||
(void)fputc((int)(unsigned char)ch, 1);
|
||||
}
|
||||
|
||||
void ush_writeln(const char *text) {
|
||||
ush_write(text);
|
||||
ush_write_char('\n');
|
||||
}
|
||||
|
||||
void ush_write_hex_u64(u64 value) {
|
||||
i64 nibble;
|
||||
|
||||
ush_write("0X");
|
||||
|
||||
for (nibble = 15; nibble >= 0; nibble--) {
|
||||
u64 current = (value >> (u64)(nibble * 4)) & 0x0FULL;
|
||||
char out = (current < 10ULL) ? (char)('0' + current) : (char)('A' + (current - 10ULL));
|
||||
ush_write_char(out);
|
||||
}
|
||||
}
|
||||
|
||||
void ush_print_kv_hex(const char *label, u64 value) {
|
||||
ush_write(label);
|
||||
ush_write(": ");
|
||||
ush_write_hex_u64(value);
|
||||
ush_write_char('\n');
|
||||
}
|
||||
|
||||
static int ush_path_push_component(char *path, u64 path_size, u64 *io_len, const char *component, u64 comp_len) {
|
||||
u64 i;
|
||||
|
||||
if (path == (char *)0 || io_len == (u64 *)0 || component == (const char *)0 || comp_len == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (*io_len == 1ULL) {
|
||||
if (*io_len + comp_len >= path_size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0ULL; i < comp_len; i++) {
|
||||
path[1ULL + i] = component[i];
|
||||
}
|
||||
|
||||
*io_len = 1ULL + comp_len;
|
||||
path[*io_len] = '\0';
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (*io_len + 1ULL + comp_len >= path_size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
path[*io_len] = '/';
|
||||
for (i = 0ULL; i < comp_len; i++) {
|
||||
path[*io_len + 1ULL + i] = component[i];
|
||||
}
|
||||
|
||||
*io_len += (1ULL + comp_len);
|
||||
path[*io_len] = '\0';
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void ush_path_pop_component(char *path, u64 *io_len) {
|
||||
if (path == (char *)0 || io_len == (u64 *)0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (*io_len <= 1ULL) {
|
||||
path[0] = '/';
|
||||
path[1] = '\0';
|
||||
*io_len = 1ULL;
|
||||
return;
|
||||
}
|
||||
|
||||
while (*io_len > 1ULL && path[*io_len - 1ULL] != '/') {
|
||||
(*io_len)--;
|
||||
}
|
||||
|
||||
if (*io_len > 1ULL) {
|
||||
(*io_len)--;
|
||||
}
|
||||
|
||||
path[*io_len] = '\0';
|
||||
}
|
||||
|
||||
static int ush_path_parse_into(const char *src, char *out_path, u64 out_size, u64 *io_len) {
|
||||
u64 i = 0ULL;
|
||||
|
||||
if (src == (const char *)0 || out_path == (char *)0 || io_len == (u64 *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (src[0] == '/') {
|
||||
i = 1ULL;
|
||||
}
|
||||
|
||||
while (src[i] != '\0') {
|
||||
u64 start;
|
||||
u64 len;
|
||||
|
||||
while (src[i] == '/') {
|
||||
i++;
|
||||
}
|
||||
|
||||
if (src[i] == '\0') {
|
||||
break;
|
||||
}
|
||||
|
||||
start = i;
|
||||
|
||||
while (src[i] != '\0' && src[i] != '/') {
|
||||
i++;
|
||||
}
|
||||
|
||||
len = i - start;
|
||||
|
||||
if (len == 1ULL && src[start] == '.') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (len == 2ULL && src[start] == '.' && src[start + 1ULL] == '.') {
|
||||
ush_path_pop_component(out_path, io_len);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ush_path_push_component(out_path, out_size, io_len, src + start, len) == 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ush_resolve_path(const ush_state *sh, const char *arg, char *out_path, u64 out_size) {
|
||||
u64 len = 1ULL;
|
||||
|
||||
if (sh == (const ush_state *)0 || out_path == (char *)0 || out_size < 2ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out_path[0] = '/';
|
||||
out_path[1] = '\0';
|
||||
|
||||
if (arg == (const char *)0 || arg[0] == '\0') {
|
||||
return ush_path_parse_into(sh->cwd, out_path, out_size, &len);
|
||||
}
|
||||
|
||||
if (arg[0] != '/') {
|
||||
if (ush_path_parse_into(sh->cwd, out_path, out_size, &len) == 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return ush_path_parse_into(arg, out_path, out_size, &len);
|
||||
}
|
||||
|
||||
int ush_resolve_exec_path(const ush_state *sh, const char *arg, char *out_path, u64 out_size) {
|
||||
u64 i;
|
||||
u64 cursor = 0ULL;
|
||||
|
||||
if (sh == (const ush_state *)0 || arg == (const char *)0 || out_path == (char *)0 || out_size == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (arg[0] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out_path[0] = '\0';
|
||||
|
||||
if (arg[0] == '/') {
|
||||
ush_copy(out_path, out_size, arg);
|
||||
} else if (ush_contains_char(arg, '/') != 0) {
|
||||
if (ush_resolve_path(sh, arg, out_path, out_size) == 0) {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
static const char prefix[] = "/shell/";
|
||||
u64 prefix_len = (u64)(sizeof(prefix) - 1U);
|
||||
|
||||
if (prefix_len + 1ULL >= out_size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0ULL; i < prefix_len; i++) {
|
||||
out_path[cursor++] = prefix[i];
|
||||
}
|
||||
|
||||
for (i = 0ULL; arg[i] != '\0'; i++) {
|
||||
if (cursor + 1ULL >= out_size) {
|
||||
return 0;
|
||||
}
|
||||
out_path[cursor++] = arg[i];
|
||||
}
|
||||
|
||||
out_path[cursor] = '\0';
|
||||
}
|
||||
|
||||
if (ush_has_suffix(out_path, ".elf") == 0) {
|
||||
static const char suffix[] = ".elf";
|
||||
|
||||
cursor = ush_strlen(out_path);
|
||||
|
||||
for (i = 0ULL; suffix[i] != '\0'; i++) {
|
||||
if (cursor + 1ULL >= out_size) {
|
||||
return 0;
|
||||
}
|
||||
out_path[cursor++] = suffix[i];
|
||||
}
|
||||
|
||||
out_path[cursor] = '\0';
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ush_path_is_under_system(const char *path) {
|
||||
if (path == (const char *)0) {
|
||||
return 0;
|
||||
}
|
||||
if (strncmp(path, "/system", 7U) != 0) {
|
||||
return 0;
|
||||
}
|
||||
return (path[7] == '\0' || path[7] == '/') ? 1 : 0;
|
||||
}
|
||||
|
||||
int ush_path_is_under_temp(const char *path) {
|
||||
if (path == (const char *)0) {
|
||||
return 0;
|
||||
}
|
||||
if (strncmp(path, "/temp", 5U) != 0) {
|
||||
return 0;
|
||||
}
|
||||
return (path[5] == '\0' || path[5] == '/') ? 1 : 0;
|
||||
}
|
||||
|
||||
int ush_split_first_and_rest(const char *arg, char *out_first, u64 out_first_size, const char **out_rest) {
|
||||
u64 i = 0ULL;
|
||||
u64 p = 0ULL;
|
||||
|
||||
if (arg == (const char *)0 || out_first == (char *)0 || out_first_size == 0ULL || out_rest == (const char **)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out_first[0] = '\0';
|
||||
*out_rest = "";
|
||||
|
||||
while (arg[i] != '\0' && ush_is_space(arg[i]) != 0) {
|
||||
i++;
|
||||
}
|
||||
|
||||
if (arg[i] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (arg[i] != '\0' && ush_is_space(arg[i]) == 0) {
|
||||
if (p + 1ULL < out_first_size) {
|
||||
out_first[p++] = arg[i];
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
out_first[p] = '\0';
|
||||
|
||||
while (arg[i] != '\0' && ush_is_space(arg[i]) != 0) {
|
||||
i++;
|
||||
}
|
||||
|
||||
*out_rest = &arg[i];
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ush_split_two_args(const char *arg, char *out_first, u64 out_first_size, char *out_second, u64 out_second_size) {
|
||||
u64 i = 0ULL;
|
||||
u64 p = 0ULL;
|
||||
|
||||
if (arg == (const char *)0 || out_first == (char *)0 || out_first_size == 0ULL || out_second == (char *)0 ||
|
||||
out_second_size == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out_first[0] = '\0';
|
||||
out_second[0] = '\0';
|
||||
|
||||
while (arg[i] != '\0' && ush_is_space(arg[i]) != 0) {
|
||||
i++;
|
||||
}
|
||||
|
||||
if (arg[i] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (arg[i] != '\0' && ush_is_space(arg[i]) == 0) {
|
||||
if (p + 1ULL < out_first_size) {
|
||||
out_first[p++] = arg[i];
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
out_first[p] = '\0';
|
||||
|
||||
while (arg[i] != '\0' && ush_is_space(arg[i]) != 0) {
|
||||
i++;
|
||||
}
|
||||
|
||||
if (arg[i] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
p = 0ULL;
|
||||
while (arg[i] != '\0' && ush_is_space(arg[i]) == 0) {
|
||||
if (p + 1ULL < out_second_size) {
|
||||
out_second[p++] = arg[i];
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
out_second[p] = '\0';
|
||||
|
||||
return (out_first[0] != '\0' && out_second[0] != '\0') ? 1 : 0;
|
||||
}
|
||||
|
||||
int ush_command_ctx_read(ush_cmd_ctx *out_ctx) {
|
||||
u64 got;
|
||||
|
||||
if (out_ctx == (ush_cmd_ctx *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ush_zero(out_ctx, (u64)sizeof(*out_ctx));
|
||||
got = cleonos_sys_fs_read(USH_CMD_CTX_PATH, (char *)out_ctx, (u64)sizeof(*out_ctx));
|
||||
return (got == (u64)sizeof(*out_ctx)) ? 1 : 0;
|
||||
}
|
||||
|
||||
int ush_command_ret_write(const ush_cmd_ret *ret) {
|
||||
if (ret == (const ush_cmd_ret *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (cleonos_sys_fs_write(USH_CMD_RET_PATH, (const char *)ret, (u64)sizeof(*ret)) != 0ULL) ? 1 : 0;
|
||||
}
|
||||
98
cleonos/c/apps/cmd_runtime.h
Normal file
98
cleonos/c/apps/cmd_runtime.h
Normal file
@@ -0,0 +1,98 @@
|
||||
#ifndef CLEONOS_CMD_RUNTIME_H
|
||||
#define CLEONOS_CMD_RUNTIME_H
|
||||
|
||||
#include <cleonos_syscall.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef long long i64;
|
||||
|
||||
#define USH_CMD_MAX 32ULL
|
||||
#define USH_ARG_MAX 160ULL
|
||||
#define USH_LINE_MAX 192ULL
|
||||
#define USH_PATH_MAX 192ULL
|
||||
#define USH_CAT_MAX 512ULL
|
||||
#define USH_SCRIPT_MAX 1024ULL
|
||||
#define USH_CLEAR_LINES 56ULL
|
||||
#define USH_HISTORY_MAX 16ULL
|
||||
#define USH_DMESG_DEFAULT 64ULL
|
||||
#define USH_DMESG_LINE_MAX 256ULL
|
||||
#define USH_COPY_MAX 65536U
|
||||
|
||||
#define USH_CMD_CTX_PATH "/temp/.ush_cmd_ctx.bin"
|
||||
#define USH_CMD_RET_PATH "/temp/.ush_cmd_ret.bin"
|
||||
#define USH_CMD_RET_FLAG_CWD 0x1ULL
|
||||
#define USH_CMD_RET_FLAG_EXIT 0x2ULL
|
||||
|
||||
typedef struct ush_state {
|
||||
char line[USH_LINE_MAX];
|
||||
u64 line_len;
|
||||
u64 cursor;
|
||||
u64 rendered_len;
|
||||
|
||||
char cwd[USH_PATH_MAX];
|
||||
|
||||
char history[USH_HISTORY_MAX][USH_LINE_MAX];
|
||||
u64 history_count;
|
||||
i64 history_nav;
|
||||
char nav_saved_line[USH_LINE_MAX];
|
||||
u64 nav_saved_len;
|
||||
u64 nav_saved_cursor;
|
||||
|
||||
u64 cmd_total;
|
||||
u64 cmd_ok;
|
||||
u64 cmd_fail;
|
||||
u64 cmd_unknown;
|
||||
int exit_requested;
|
||||
u64 exit_code;
|
||||
} ush_state;
|
||||
|
||||
typedef struct ush_cmd_ctx {
|
||||
char cmd[USH_CMD_MAX];
|
||||
char arg[USH_ARG_MAX];
|
||||
char cwd[USH_PATH_MAX];
|
||||
} ush_cmd_ctx;
|
||||
|
||||
typedef struct ush_cmd_ret {
|
||||
u64 flags;
|
||||
u64 exit_code;
|
||||
char cwd[USH_PATH_MAX];
|
||||
} ush_cmd_ret;
|
||||
|
||||
extern const char *ush_pipeline_stdin_text;
|
||||
extern u64 ush_pipeline_stdin_len;
|
||||
|
||||
void ush_zero(void *ptr, u64 size);
|
||||
void ush_init_state(ush_state *sh);
|
||||
|
||||
u64 ush_strlen(const char *str);
|
||||
int ush_streq(const char *left, const char *right);
|
||||
int ush_is_space(char ch);
|
||||
int ush_is_printable(char ch);
|
||||
int ush_has_suffix(const char *name, const char *suffix);
|
||||
int ush_contains_char(const char *text, char needle);
|
||||
int ush_parse_u64_dec(const char *text, u64 *out_value);
|
||||
void ush_copy(char *dst, u64 dst_size, const char *src);
|
||||
void ush_trim_line(char *line);
|
||||
void ush_parse_line(const char *line, char *out_cmd, u64 cmd_size, char *out_arg, u64 arg_size);
|
||||
|
||||
void ush_write(const char *text);
|
||||
void ush_write_char(char ch);
|
||||
void ush_writeln(const char *text);
|
||||
void ush_write_hex_u64(u64 value);
|
||||
void ush_print_kv_hex(const char *label, u64 value);
|
||||
|
||||
int ush_resolve_path(const ush_state *sh, const char *arg, char *out_path, u64 out_size);
|
||||
int ush_resolve_exec_path(const ush_state *sh, const char *arg, char *out_path, u64 out_size);
|
||||
int ush_path_is_under_system(const char *path);
|
||||
int ush_path_is_under_temp(const char *path);
|
||||
|
||||
int ush_split_first_and_rest(const char *arg, char *out_first, u64 out_first_size, const char **out_rest);
|
||||
int ush_split_two_args(const char *arg, char *out_first, u64 out_first_size, char *out_second, u64 out_second_size);
|
||||
|
||||
int ush_command_ctx_read(ush_cmd_ctx *out_ctx);
|
||||
int ush_command_ret_write(const ush_cmd_ret *ret);
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,131 @@
|
||||
#include "shell/shell_internal.h"
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_copy_file(const char *src_path, const char *dst_path) {
|
||||
static char copy_buf[4096];
|
||||
u64 src_fd;
|
||||
u64 dst_fd;
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("cp");
|
||||
if (cleonos_sys_fs_stat_type(src_path) != 1ULL) {
|
||||
ush_writeln("cp: source file not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
src_fd = cleonos_sys_fd_open(src_path, CLEONOS_O_RDONLY, 0ULL);
|
||||
if (src_fd == (u64)-1) {
|
||||
ush_writeln("cp: failed to open source");
|
||||
return 0;
|
||||
}
|
||||
|
||||
dst_fd = cleonos_sys_fd_open(dst_path, CLEONOS_O_WRONLY | CLEONOS_O_CREAT | CLEONOS_O_TRUNC, 0ULL);
|
||||
if (dst_fd == (u64)-1) {
|
||||
(void)cleonos_sys_fd_close(src_fd);
|
||||
ush_writeln("cp: failed to open destination");
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
u64 got = cleonos_sys_fd_read(src_fd, copy_buf, (u64)sizeof(copy_buf));
|
||||
|
||||
if (got == (u64)-1) {
|
||||
(void)cleonos_sys_fd_close(dst_fd);
|
||||
(void)cleonos_sys_fd_close(src_fd);
|
||||
ush_writeln("cp: read failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (got == 0ULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
{
|
||||
u64 written_total = 0ULL;
|
||||
while (written_total < got) {
|
||||
u64 written = cleonos_sys_fd_write(dst_fd, copy_buf + written_total, got - written_total);
|
||||
if (written == (u64)-1 || written == 0ULL) {
|
||||
(void)cleonos_sys_fd_close(dst_fd);
|
||||
(void)cleonos_sys_fd_close(src_fd);
|
||||
ush_writeln("cp: write failed");
|
||||
return 0;
|
||||
}
|
||||
written_total += written;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
(void)cleonos_sys_fd_close(dst_fd);
|
||||
(void)cleonos_sys_fd_close(src_fd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ush_cmd_cp(const ush_state *sh, const char *arg) {
|
||||
char src_arg[USH_PATH_MAX];
|
||||
char dst_arg[USH_PATH_MAX];
|
||||
char src_path[USH_PATH_MAX];
|
||||
char dst_path[USH_PATH_MAX];
|
||||
|
||||
if (arg == (const char *)0 || arg[0] == '\0') {
|
||||
ush_writeln("cp: usage cp <src> <dst>");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_split_two_args(arg, src_arg, (u64)sizeof(src_arg), dst_arg, (u64)sizeof(dst_arg)) == 0) {
|
||||
ush_writeln("cp: usage cp <src> <dst>");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_resolve_path(sh, src_arg, src_path, (u64)sizeof(src_path)) == 0 ||
|
||||
ush_resolve_path(sh, dst_arg, dst_path, (u64)sizeof(dst_path)) == 0) {
|
||||
ush_writeln("cp: invalid path");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_path_is_under_temp(dst_path) == 0) {
|
||||
ush_writeln("cp: destination must be under /temp");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ush_copy_file(src_path, dst_path);
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "cp") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_cp(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
264
cleonos/c/apps/cut_main.c
Normal file
264
cleonos/c/apps/cut_main.c
Normal file
@@ -0,0 +1,264 @@
|
||||
#include "cmd_runtime.h"
|
||||
|
||||
static int ush_cut_parse_delim(const char *token, char *out_delim) {
|
||||
if (token == (const char *)0 || out_delim == (char *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (token[0] == '\\' && token[1] == 't' && token[2] == '\0') {
|
||||
*out_delim = '\t';
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (token[0] == '\0' || token[1] != '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*out_delim = token[0];
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ush_cut_parse_args(const char *arg, char *out_delim, u64 *out_field, char *out_file, u64 out_file_size) {
|
||||
char token[USH_PATH_MAX];
|
||||
char value[USH_PATH_MAX];
|
||||
const char *cursor = arg;
|
||||
const char *rest = "";
|
||||
int delim_set = 0;
|
||||
int field_set = 0;
|
||||
int file_set = 0;
|
||||
u64 parsed_field = 0ULL;
|
||||
|
||||
if (out_delim == (char *)0 || out_field == (u64 *)0 || out_file == (char *)0 || out_file_size == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*out_delim = ',';
|
||||
*out_field = 1ULL;
|
||||
out_file[0] = '\0';
|
||||
|
||||
if (cursor == (const char *)0 || cursor[0] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (cursor != (const char *)0 && cursor[0] != '\0') {
|
||||
if (ush_split_first_and_rest(cursor, token, (u64)sizeof(token), &rest) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_streq(token, "-d") != 0) {
|
||||
if (ush_split_first_and_rest(rest, value, (u64)sizeof(value), &cursor) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_cut_parse_delim(value, out_delim) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
delim_set = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ush_streq(token, "-f") != 0) {
|
||||
if (ush_split_first_and_rest(rest, value, (u64)sizeof(value), &cursor) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_parse_u64_dec(value, &parsed_field) == 0 || parsed_field == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*out_field = parsed_field;
|
||||
field_set = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (token[0] == '-') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (file_set != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ush_copy(out_file, out_file_size, token);
|
||||
file_set = 1;
|
||||
cursor = rest;
|
||||
}
|
||||
|
||||
return (delim_set != 0 && field_set != 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
static int ush_cut_load_input(const ush_state *sh, const char *file_arg, const char **out_input, u64 *out_input_len) {
|
||||
static char file_buf[USH_COPY_MAX + 1U];
|
||||
char path[USH_PATH_MAX];
|
||||
u64 size;
|
||||
u64 got;
|
||||
|
||||
if (sh == (const ush_state *)0 || out_input == (const char **)0 || out_input_len == (u64 *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*out_input = (const char *)0;
|
||||
*out_input_len = 0ULL;
|
||||
|
||||
if (file_arg != (const char *)0 && file_arg[0] != '\0') {
|
||||
if (ush_resolve_path(sh, file_arg, path, (u64)sizeof(path)) == 0) {
|
||||
ush_writeln("cut: invalid path");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cleonos_sys_fs_stat_type(path) != 1ULL) {
|
||||
ush_writeln("cut: file not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
size = cleonos_sys_fs_stat_size(path);
|
||||
|
||||
if (size == (u64)-1) {
|
||||
ush_writeln("cut: failed to stat file");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (size > (u64)USH_COPY_MAX) {
|
||||
ush_writeln("cut: file too large for user buffer");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (size == 0ULL) {
|
||||
file_buf[0] = '\0';
|
||||
*out_input = file_buf;
|
||||
*out_input_len = 0ULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
got = cleonos_sys_fs_read(path, file_buf, size);
|
||||
|
||||
if (got == 0ULL || got != size) {
|
||||
ush_writeln("cut: read failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
file_buf[got] = '\0';
|
||||
*out_input = file_buf;
|
||||
*out_input_len = got;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ush_pipeline_stdin_text == (const char *)0) {
|
||||
ush_writeln("cut: file path required (or pipeline input)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
*out_input = ush_pipeline_stdin_text;
|
||||
*out_input_len = ush_pipeline_stdin_len;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void ush_cut_emit_field(const char *line, u64 line_len, char delim, u64 field_index) {
|
||||
u64 pos;
|
||||
u64 current_field = 1ULL;
|
||||
u64 field_start = 0ULL;
|
||||
int emitted = 0;
|
||||
|
||||
for (pos = 0ULL; pos <= line_len; pos++) {
|
||||
if (pos == line_len || line[pos] == delim) {
|
||||
if (current_field == field_index) {
|
||||
u64 j;
|
||||
for (j = field_start; j < pos; j++) {
|
||||
ush_write_char(line[j]);
|
||||
}
|
||||
emitted = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
current_field++;
|
||||
field_start = pos + 1ULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (emitted == 0) {
|
||||
/* keep empty line */
|
||||
}
|
||||
|
||||
ush_write_char('\n');
|
||||
}
|
||||
|
||||
static int ush_cmd_cut(const ush_state *sh, const char *arg) {
|
||||
char file_arg[USH_PATH_MAX];
|
||||
const char *input = (const char *)0;
|
||||
u64 input_len = 0ULL;
|
||||
char delim = ',';
|
||||
u64 field_index = 1ULL;
|
||||
u64 i;
|
||||
u64 start = 0ULL;
|
||||
|
||||
if (sh == (const ush_state *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_cut_parse_args(arg, &delim, &field_index, file_arg, (u64)sizeof(file_arg)) == 0) {
|
||||
ush_writeln("cut: usage cut -d <char> -f <N> [file]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_cut_load_input(sh, file_arg, &input, &input_len) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0ULL; i < input_len; i++) {
|
||||
if (input[i] == '\n') {
|
||||
ush_cut_emit_field(&input[start], i - start, delim, field_index);
|
||||
start = i + 1ULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (start < input_len) {
|
||||
ush_cut_emit_field(&input[start], input_len - start, delim, field_index);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "cut") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_cut(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
48
cleonos/c/apps/dltest_main.c
Normal file
48
cleonos/c/apps/dltest_main.c
Normal file
@@ -0,0 +1,48 @@
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
|
||||
typedef unsigned long long u64;
|
||||
typedef u64 (*dl_math2_fn)(u64, u64);
|
||||
typedef u64 (*dl_void_fn)(void);
|
||||
|
||||
int cleonos_app_main(int argc, char **argv, char **envp) {
|
||||
const char *lib_path = "/shell/libdemo.elf";
|
||||
void *handle;
|
||||
dl_math2_fn add_fn;
|
||||
dl_math2_fn mul_fn;
|
||||
dl_void_fn hello_fn;
|
||||
|
||||
(void)envp;
|
||||
|
||||
if (argc > 1 && argv != (char **)0 && argv[1] != (char *)0 && argv[1][0] != '\0') {
|
||||
lib_path = argv[1];
|
||||
}
|
||||
|
||||
handle = dlopen(lib_path, 0);
|
||||
if (handle == (void *)0) {
|
||||
(void)printf("[dltest] dlopen failed: %s\n", lib_path);
|
||||
return 1;
|
||||
}
|
||||
|
||||
add_fn = (dl_math2_fn)dlsym(handle, "cleonos_libdemo_add");
|
||||
mul_fn = (dl_math2_fn)dlsym(handle, "cleonos_libdemo_mul");
|
||||
hello_fn = (dl_void_fn)dlsym(handle, "cleonos_libdemo_hello");
|
||||
|
||||
if (add_fn == (dl_math2_fn)0 || mul_fn == (dl_math2_fn)0 || hello_fn == (dl_void_fn)0) {
|
||||
(void)puts("[dltest] dlsym failed");
|
||||
(void)dlclose(handle);
|
||||
return 2;
|
||||
}
|
||||
|
||||
(void)hello_fn();
|
||||
(void)printf("[dltest] add(7, 35) = %llu\n", add_fn(7ULL, 35ULL));
|
||||
(void)printf("[dltest] mul(6, 9) = %llu\n", mul_fn(6ULL, 9ULL));
|
||||
|
||||
if (dlclose(handle) != 0) {
|
||||
(void)puts("[dltest] dlclose failed");
|
||||
return 3;
|
||||
}
|
||||
|
||||
(void)puts("[dltest] PASS");
|
||||
return 0;
|
||||
}
|
||||
@@ -1,6 +1,79 @@
|
||||
#include "shell/shell_internal.h"
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_dmesg(const char *arg) {
|
||||
u64 total = cleonos_sys_log_journal_count();
|
||||
u64 limit = USH_DMESG_DEFAULT;
|
||||
u64 start;
|
||||
u64 i;
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("dmesg");
|
||||
if (arg != (const char *)0 && arg[0] != '\0') {
|
||||
if (ush_parse_u64_dec(arg, &limit) == 0 || limit == 0ULL) {
|
||||
ush_writeln("dmesg: usage dmesg [positive_count]");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (total == 0ULL) {
|
||||
ush_writeln("(journal empty)");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (limit > total) {
|
||||
limit = total;
|
||||
}
|
||||
|
||||
start = total - limit;
|
||||
|
||||
for (i = start; i < total; i++) {
|
||||
char line[USH_DMESG_LINE_MAX];
|
||||
|
||||
if (cleonos_sys_log_journal_read(i, line, (u64)sizeof(line)) != 0ULL) {
|
||||
ush_writeln(line);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "dmesg") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_dmesg(arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
1472
cleonos/c/apps/doom/doom_compat.c
Normal file
1472
cleonos/c/apps/doom/doom_compat.c
Normal file
File diff suppressed because it is too large
Load Diff
21
cleonos/c/apps/doom/doom_shim.h
Normal file
21
cleonos/c/apps/doom/doom_shim.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef CLEONOS_DOOM_SHIM_H
|
||||
#define CLEONOS_DOOM_SHIM_H
|
||||
|
||||
/* Redirect stdio-family APIs that clash with cleonos/c/src/stdio.c signatures. */
|
||||
#define fopen dg_fopen
|
||||
#define fclose dg_fclose
|
||||
#define fread dg_fread
|
||||
#define fwrite dg_fwrite
|
||||
#define fseek dg_fseek
|
||||
#define ftell dg_ftell
|
||||
#define fflush dg_fflush
|
||||
#define fgets dg_fgets
|
||||
#define fprintf dg_fprintf
|
||||
#define vfprintf dg_vfprintf
|
||||
#define feof dg_feof
|
||||
#define fileno dg_fileno
|
||||
#define perror dg_perror
|
||||
#define sscanf dg_sscanf
|
||||
|
||||
#endif
|
||||
|
||||
197
cleonos/c/apps/doom/doomgeneric_clks.c
Normal file
197
cleonos/c/apps/doom/doomgeneric_clks.c
Normal file
@@ -0,0 +1,197 @@
|
||||
#include "doomgeneric.h"
|
||||
#include "doomkeys.h"
|
||||
|
||||
#include "../../include/cleonos_syscall.h"
|
||||
|
||||
#define CLEONOS_KEY_LEFT 0x01U
|
||||
#define CLEONOS_KEY_RIGHT 0x02U
|
||||
#define CLEONOS_KEY_UP 0x03U
|
||||
#define CLEONOS_KEY_DOWN 0x04U
|
||||
|
||||
#define DG_KEY_QUEUE_CAP 256U
|
||||
|
||||
struct dg_key_event {
|
||||
int pressed;
|
||||
unsigned char key;
|
||||
};
|
||||
|
||||
static struct dg_key_event g_key_queue[DG_KEY_QUEUE_CAP];
|
||||
static u64 g_key_r = 0ULL;
|
||||
static u64 g_key_w = 0ULL;
|
||||
|
||||
static cleonos_fb_info g_fb_info;
|
||||
static cleonos_fb_blit_req g_blit_req;
|
||||
static u64 g_scale = 1ULL;
|
||||
static u64 g_dst_x = 0ULL;
|
||||
static u64 g_dst_y = 0ULL;
|
||||
|
||||
static void dg_push_key(int pressed, unsigned char key) {
|
||||
u64 next = (g_key_w + 1ULL) % DG_KEY_QUEUE_CAP;
|
||||
|
||||
if (next == g_key_r) {
|
||||
return;
|
||||
}
|
||||
|
||||
g_key_queue[g_key_w].pressed = pressed;
|
||||
g_key_queue[g_key_w].key = key;
|
||||
g_key_w = next;
|
||||
}
|
||||
|
||||
static int dg_pop_key(int *pressed, unsigned char *key) {
|
||||
if (g_key_r == g_key_w || pressed == (int *)0 || key == (unsigned char *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*pressed = g_key_queue[g_key_r].pressed;
|
||||
*key = g_key_queue[g_key_r].key;
|
||||
g_key_r = (g_key_r + 1ULL) % DG_KEY_QUEUE_CAP;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static unsigned char dg_translate_key(u64 code) {
|
||||
if (code == (u64)CLEONOS_KEY_LEFT) {
|
||||
return KEY_LEFTARROW;
|
||||
}
|
||||
|
||||
if (code == (u64)CLEONOS_KEY_RIGHT) {
|
||||
return KEY_RIGHTARROW;
|
||||
}
|
||||
|
||||
if (code == (u64)CLEONOS_KEY_UP) {
|
||||
return KEY_UPARROW;
|
||||
}
|
||||
|
||||
if (code == (u64)CLEONOS_KEY_DOWN) {
|
||||
return KEY_DOWNARROW;
|
||||
}
|
||||
|
||||
if (code == (u64)'\r' || code == (u64)'\n') {
|
||||
return KEY_ENTER;
|
||||
}
|
||||
|
||||
if (code == (u64)8U || code == (u64)127U) {
|
||||
return KEY_BACKSPACE;
|
||||
}
|
||||
|
||||
if (code == (u64)27U) {
|
||||
return KEY_ESCAPE;
|
||||
}
|
||||
|
||||
if (code == (u64)'\t') {
|
||||
return KEY_TAB;
|
||||
}
|
||||
|
||||
if (code >= 32ULL && code <= 126ULL) {
|
||||
return (unsigned char)(code & 0xFFULL);
|
||||
}
|
||||
|
||||
return 0U;
|
||||
}
|
||||
|
||||
static void dg_poll_keyboard(void) {
|
||||
for (;;) {
|
||||
u64 code = cleonos_sys_kbd_get_char();
|
||||
unsigned char key;
|
||||
|
||||
if (code == (u64)-1) {
|
||||
break;
|
||||
}
|
||||
|
||||
key = dg_translate_key(code);
|
||||
|
||||
if (key == 0U) {
|
||||
continue;
|
||||
}
|
||||
|
||||
dg_push_key(1, key);
|
||||
dg_push_key(0, key);
|
||||
}
|
||||
}
|
||||
|
||||
void DG_Init(void) {
|
||||
u64 sx;
|
||||
u64 sy;
|
||||
|
||||
g_key_r = 0ULL;
|
||||
g_key_w = 0ULL;
|
||||
|
||||
g_fb_info.width = 0ULL;
|
||||
g_fb_info.height = 0ULL;
|
||||
g_fb_info.pitch = 0ULL;
|
||||
g_fb_info.bpp = 0ULL;
|
||||
|
||||
if (cleonos_sys_fb_info(&g_fb_info) == 0ULL || g_fb_info.width == 0ULL || g_fb_info.height == 0ULL ||
|
||||
g_fb_info.bpp != 32ULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
sx = g_fb_info.width / (u64)DOOMGENERIC_RESX;
|
||||
sy = g_fb_info.height / (u64)DOOMGENERIC_RESY;
|
||||
g_scale = (sx < sy) ? sx : sy;
|
||||
|
||||
if (g_scale == 0ULL) {
|
||||
g_scale = 1ULL;
|
||||
}
|
||||
|
||||
if (g_scale > 4ULL) {
|
||||
g_scale = 4ULL;
|
||||
}
|
||||
|
||||
g_dst_x = (g_fb_info.width > ((u64)DOOMGENERIC_RESX * g_scale)) ? ((g_fb_info.width - ((u64)DOOMGENERIC_RESX * g_scale)) / 2ULL) : 0ULL;
|
||||
g_dst_y = (g_fb_info.height > ((u64)DOOMGENERIC_RESY * g_scale)) ? ((g_fb_info.height - ((u64)DOOMGENERIC_RESY * g_scale)) / 2ULL) : 0ULL;
|
||||
|
||||
g_blit_req.pixels_ptr = 0ULL;
|
||||
g_blit_req.src_width = (u64)DOOMGENERIC_RESX;
|
||||
g_blit_req.src_height = (u64)DOOMGENERIC_RESY;
|
||||
g_blit_req.src_pitch_bytes = (u64)DOOMGENERIC_RESX * 4ULL;
|
||||
g_blit_req.dst_x = g_dst_x;
|
||||
g_blit_req.dst_y = g_dst_y;
|
||||
g_blit_req.scale = g_scale;
|
||||
|
||||
(void)cleonos_sys_fb_clear(0x00000000ULL);
|
||||
}
|
||||
|
||||
void DG_DrawFrame(void) {
|
||||
dg_poll_keyboard();
|
||||
|
||||
if (g_fb_info.width == 0ULL || g_fb_info.height == 0ULL || DG_ScreenBuffer == (pixel_t *)0) {
|
||||
return;
|
||||
}
|
||||
|
||||
g_blit_req.pixels_ptr = (u64)(void *)DG_ScreenBuffer;
|
||||
(void)cleonos_sys_fb_blit(&g_blit_req);
|
||||
}
|
||||
|
||||
void DG_SleepMs(uint32_t ms) {
|
||||
u64 ticks = ((u64)ms + 9ULL) / 10ULL;
|
||||
|
||||
if (ticks == 0ULL && ms != 0U) {
|
||||
ticks = 1ULL;
|
||||
}
|
||||
|
||||
if (ticks > 0ULL) {
|
||||
(void)cleonos_sys_sleep_ticks(ticks);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t DG_GetTicksMs(void) {
|
||||
return (uint32_t)(cleonos_sys_timer_ticks() * 10ULL);
|
||||
}
|
||||
|
||||
int DG_GetKey(int *pressed, unsigned char *key) {
|
||||
dg_poll_keyboard();
|
||||
return dg_pop_key(pressed, key);
|
||||
}
|
||||
|
||||
void DG_SetWindowTitle(const char *title) {
|
||||
(void)title;
|
||||
}
|
||||
|
||||
int cl_doom_run_main(int argc, char **argv) {
|
||||
doomgeneric_Create(argc, argv);
|
||||
|
||||
for (;;) {
|
||||
doomgeneric_Tick();
|
||||
}
|
||||
}
|
||||
|
||||
87
cleonos/c/apps/doom_main.c
Normal file
87
cleonos/c/apps/doom_main.c
Normal file
@@ -0,0 +1,87 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <cleonos_syscall.h>
|
||||
|
||||
int cl_doom_run_main(int argc, char **argv);
|
||||
|
||||
static const char *cl_doom_pick_default_wad(void) {
|
||||
static const char *candidates[] = {
|
||||
"/doom1.wad",
|
||||
"/DOOM1.WAD",
|
||||
"/temp/doom1.wad",
|
||||
"/temp/DOOM1.WAD",
|
||||
"/shell/doom1.wad",
|
||||
"/shell/DOOM1.WAD",
|
||||
};
|
||||
u64 i;
|
||||
|
||||
for (i = 0ULL; i < (u64)(sizeof(candidates) / sizeof(candidates[0])); i++) {
|
||||
if (cleonos_sys_fs_stat_size(candidates[i]) != (u64)-1) {
|
||||
return candidates[i];
|
||||
}
|
||||
}
|
||||
|
||||
return (const char *)0;
|
||||
}
|
||||
|
||||
int cleonos_app_main(int argc, char **argv, char **envp) {
|
||||
char *run_argv[32];
|
||||
int run_argc = 0;
|
||||
int i;
|
||||
const char *auto_wad = (const char *)0;
|
||||
int has_iwad = 0;
|
||||
|
||||
(void)envp;
|
||||
|
||||
if (argc <= 0 || argv == (char **)0 || argv[0] == (char *)0) {
|
||||
(void)printf("doom: invalid argv\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (argv[i] != (char *)0 && strcmp(argv[i], "-iwad") == 0) {
|
||||
has_iwad = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
run_argv[run_argc++] = argv[0];
|
||||
|
||||
if (has_iwad == 0) {
|
||||
if (argc > 1 && argv[1] != (char *)0 && argv[1][0] != '-') {
|
||||
run_argv[run_argc++] = "-iwad";
|
||||
run_argv[run_argc++] = argv[1];
|
||||
for (i = 2; i < argc && run_argc + 1 < (int)(sizeof(run_argv) / sizeof(run_argv[0])); i++) {
|
||||
run_argv[run_argc++] = argv[i];
|
||||
}
|
||||
} else {
|
||||
auto_wad = cl_doom_pick_default_wad();
|
||||
if (auto_wad != (const char *)0) {
|
||||
run_argv[run_argc++] = "-iwad";
|
||||
run_argv[run_argc++] = (char *)auto_wad;
|
||||
}
|
||||
|
||||
for (i = 1; i < argc && run_argc + 1 < (int)(sizeof(run_argv) / sizeof(run_argv[0])); i++) {
|
||||
run_argv[run_argc++] = argv[i];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = 1; i < argc && run_argc + 1 < (int)(sizeof(run_argv) / sizeof(run_argv[0])); i++) {
|
||||
run_argv[run_argc++] = argv[i];
|
||||
}
|
||||
}
|
||||
|
||||
run_argv[run_argc] = (char *)0;
|
||||
|
||||
if (has_iwad == 0 && auto_wad == (const char *)0 && (argc <= 1 || argv[1] == (char *)0 || argv[1][0] == '-')) {
|
||||
(void)printf("doom: no WAD provided\n");
|
||||
(void)printf("doom: usage: doom /doom1.wad\n");
|
||||
(void)printf("doom: or: doom -iwad /doom1.wad\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
(void)printf("doom: launching doomgeneric\n");
|
||||
return cl_doom_run_main(run_argc, run_argv);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,106 @@
|
||||
#include "shell/shell_internal.h"
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_exec(const ush_state *sh, const char *arg) {
|
||||
char target[USH_PATH_MAX];
|
||||
char argv_line[USH_ARG_MAX];
|
||||
char env_line[USH_PATH_MAX + 32ULL];
|
||||
const char *rest = "";
|
||||
char path[USH_PATH_MAX];
|
||||
u64 status;
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("exec");
|
||||
if (sh == (const ush_state *)0 || arg == (const char *)0 || arg[0] == '\0') {
|
||||
ush_writeln("exec: usage exec <path|name> [args...]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_split_first_and_rest(arg, target, (u64)sizeof(target), &rest) == 0) {
|
||||
ush_writeln("exec: usage exec <path|name> [args...]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
argv_line[0] = '\0';
|
||||
if (rest != (const char *)0 && rest[0] != '\0') {
|
||||
ush_copy(argv_line, (u64)sizeof(argv_line), rest);
|
||||
}
|
||||
|
||||
if (ush_resolve_exec_path(sh, target, path, (u64)sizeof(path)) == 0) {
|
||||
ush_writeln("exec: invalid target");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_path_is_under_system(path) != 0) {
|
||||
ush_writeln("exec: /system/*.elf is kernel-mode (KELF), not user-exec");
|
||||
return 0;
|
||||
}
|
||||
|
||||
env_line[0] = '\0';
|
||||
ush_copy(env_line, (u64)sizeof(env_line), "PWD=");
|
||||
ush_copy(env_line + 4, (u64)(sizeof(env_line) - 4ULL), sh->cwd);
|
||||
|
||||
status = cleonos_sys_exec_pathv(path, argv_line, env_line);
|
||||
|
||||
if (status == (u64)-1) {
|
||||
ush_writeln("exec: request failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (status == 0ULL) {
|
||||
ush_writeln("exec: request accepted");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((status & (1ULL << 63)) != 0ULL) {
|
||||
ush_writeln("exec: terminated by signal");
|
||||
ush_print_kv_hex(" SIGNAL", status & 0xFFULL);
|
||||
ush_print_kv_hex(" VECTOR", (status >> 8) & 0xFFULL);
|
||||
ush_print_kv_hex(" ERROR", (status >> 16) & 0xFFFFULL);
|
||||
} else {
|
||||
ush_writeln("exec: returned non-zero status");
|
||||
ush_print_kv_hex(" STATUS", status);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "exec") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_exec(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,65 @@
|
||||
#include "shell/shell_internal.h"
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_exit(ush_state *sh, const char *arg) {
|
||||
u64 code = 0ULL;
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("exit");
|
||||
if (sh == (ush_state *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (arg != (const char *)0 && arg[0] != '\0') {
|
||||
if (ush_parse_u64_dec(arg, &code) == 0) {
|
||||
ush_writeln("exit: usage exit [code]");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
sh->exit_requested = 1;
|
||||
sh->exit_code = code;
|
||||
(void)cleonos_sys_exit(code);
|
||||
ush_writeln("exit: shell stopping");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "exit") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_exit(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
211
cleonos/c/apps/fastfetch_main.c
Normal file
211
cleonos/c/apps/fastfetch_main.c
Normal file
@@ -0,0 +1,211 @@
|
||||
#include "cmd_runtime.h"
|
||||
static u64 ush_fastfetch_u64_to_dec(char *out, u64 out_size, u64 value) {
|
||||
char rev[32];
|
||||
u64 digits = 0ULL;
|
||||
u64 i;
|
||||
|
||||
if (out == (char *)0 || out_size == 0ULL) {
|
||||
return 0ULL;
|
||||
}
|
||||
|
||||
if (value == 0ULL) {
|
||||
if (out_size < 2ULL) {
|
||||
return 0ULL;
|
||||
}
|
||||
out[0] = '0';
|
||||
out[1] = '\0';
|
||||
return 1ULL;
|
||||
}
|
||||
|
||||
while (value > 0ULL && digits < (u64)sizeof(rev)) {
|
||||
rev[digits++] = (char)('0' + (value % 10ULL));
|
||||
value /= 10ULL;
|
||||
}
|
||||
|
||||
if (digits + 1ULL > out_size) {
|
||||
out[0] = '\0';
|
||||
return 0ULL;
|
||||
}
|
||||
|
||||
for (i = 0ULL; i < digits; i++) {
|
||||
out[i] = rev[digits - 1ULL - i];
|
||||
}
|
||||
out[digits] = '\0';
|
||||
return digits;
|
||||
}
|
||||
|
||||
static void ush_fastfetch_write_u64_dec(u64 value) {
|
||||
char text[32];
|
||||
|
||||
if (ush_fastfetch_u64_to_dec(text, (u64)sizeof(text), value) == 0ULL) {
|
||||
ush_write("0");
|
||||
return;
|
||||
}
|
||||
|
||||
ush_write(text);
|
||||
}
|
||||
|
||||
static void ush_fastfetch_write_key(int plain, const char *key) {
|
||||
ush_write(" ");
|
||||
if (plain == 0) {
|
||||
ush_write("\x1B[1;96m");
|
||||
}
|
||||
ush_write(key);
|
||||
if (plain == 0) {
|
||||
ush_write("\x1B[0m");
|
||||
}
|
||||
ush_write(": ");
|
||||
}
|
||||
|
||||
static void ush_fastfetch_print_text(int plain, const char *key, const char *value) {
|
||||
ush_fastfetch_write_key(plain, key);
|
||||
ush_writeln(value);
|
||||
}
|
||||
|
||||
static void ush_fastfetch_print_u64(int plain, const char *key, u64 value) {
|
||||
ush_fastfetch_write_key(plain, key);
|
||||
ush_fastfetch_write_u64_dec(value);
|
||||
ush_write_char('\n');
|
||||
}
|
||||
|
||||
static void ush_fastfetch_print_logo(int plain) {
|
||||
if (plain == 0) {
|
||||
ush_writeln("\x1B[1;34m $$$$$$\\ $$\\ $$$$$$\\ $$$$$$\\ \x1B[0m");
|
||||
ush_writeln("\x1B[1;36m$$ __$$\\ $$ | $$ __$$\\ $$ __$$\\ \x1B[0m");
|
||||
ush_writeln("\x1B[1;32m$$ / \\__|$$ | $$$$$$\\ $$$$$$\\ $$$$$$$\\ $$ / $$ |$$ / \\__|\x1B[0m");
|
||||
ush_writeln("\x1B[1;33m$$ | $$ | $$ __$$\\ $$ __$$\\ $$ __$$\\ $$ | $$ |\\$$$$$$\\ \x1B[0m");
|
||||
ush_writeln("\x1B[1;31m$$ | $$ | $$$$$$$$ |$$ / $$ |$$ | $$ |$$ | $$ | \\____$$\\ \x1B[0m");
|
||||
ush_writeln("\x1B[1;35m$$ | $$\\ $$ | $$ ____|$$ | $$ |$$ | $$ |$$ | $$ |$$\\ $$ |\x1B[0m");
|
||||
ush_writeln("\x1B[1;94m\\$$$$$$ |$$$$$$$$\\ \\$$$$$$$\\ \\$$$$$$ |$$ | $$ | $$$$$$ |\\$$$$$$ |\x1B[0m");
|
||||
ush_writeln("\x1B[1;96m \\______/ \\________| \\_______| \\______/ \\__| \\__| \\______/ \\______/ \x1B[0m");
|
||||
ush_writeln(" ");
|
||||
ush_writeln(" ");
|
||||
} else {
|
||||
ush_writeln(" $$$$$$\\ $$\\ $$$$$$\\ $$$$$$\\ ");
|
||||
ush_writeln("$$ __$$\\ $$ | $$ __$$\\ $$ __$$\\ ");
|
||||
ush_writeln("$$ / \\__|$$ | $$$$$$\\ $$$$$$\\ $$$$$$$\\ $$ / $$ |$$ / \\__|");
|
||||
ush_writeln("$$ | $$ | $$ __$$\\ $$ __$$\\ $$ __$$\\ $$ | $$ |\\$$$$$$\\ ");
|
||||
ush_writeln("$$ | $$ | $$$$$$$$ |$$ / $$ |$$ | $$ |$$ | $$ | \\____$$\\ ");
|
||||
ush_writeln("$$ | $$\\ $$ | $$ ____|$$ | $$ |$$ | $$ |$$ | $$ |$$\\ $$ |");
|
||||
ush_writeln("\\$$$$$$ |$$$$$$$$\\ \\$$$$$$$\\ \\$$$$$$ |$$ | $$ | $$$$$$ |\\$$$$$$ |");
|
||||
ush_writeln(" \\______/ \\________| \\_______| \\______/ \\__| \\__| \\______/ \\______/ ");
|
||||
ush_writeln(" ");
|
||||
ush_writeln(" ");
|
||||
}
|
||||
}
|
||||
|
||||
static void ush_fastfetch_print_palette(int plain) {
|
||||
ush_fastfetch_write_key(plain, "Palette");
|
||||
|
||||
if (plain != 0) {
|
||||
ush_writeln("ANSI16");
|
||||
return;
|
||||
}
|
||||
|
||||
ush_write("\x1B[40m \x1B[0m\x1B[41m \x1B[0m\x1B[42m \x1B[0m\x1B[43m \x1B[0m");
|
||||
ush_write("\x1B[44m \x1B[0m\x1B[45m \x1B[0m\x1B[46m \x1B[0m\x1B[47m \x1B[0m ");
|
||||
ush_write("\x1B[100m \x1B[0m\x1B[101m \x1B[0m\x1B[102m \x1B[0m\x1B[103m \x1B[0m");
|
||||
ush_write("\x1B[104m \x1B[0m\x1B[105m \x1B[0m\x1B[106m \x1B[0m\x1B[107m \x1B[0m");
|
||||
ush_write_char('\n');
|
||||
}
|
||||
|
||||
static int ush_cmd_fastfetch(const char *arg) {
|
||||
int plain = 0;
|
||||
u64 tty_active;
|
||||
u64 tty_count;
|
||||
u64 exec_req;
|
||||
u64 exec_ok;
|
||||
|
||||
if (arg != (const char *)0 && arg[0] != '\0') {
|
||||
if (ush_streq(arg, "--plain") != 0) {
|
||||
plain = 1;
|
||||
} else if (ush_streq(arg, "--help") != 0 || ush_streq(arg, "-h") != 0) {
|
||||
ush_writeln("usage: fastfetch [--plain]");
|
||||
return 1;
|
||||
} else {
|
||||
ush_writeln("fastfetch: usage fastfetch [--plain]");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
tty_active = cleonos_sys_tty_active();
|
||||
tty_count = cleonos_sys_tty_count();
|
||||
exec_req = cleonos_sys_exec_request_count();
|
||||
exec_ok = cleonos_sys_exec_success_count();
|
||||
|
||||
ush_fastfetch_print_logo(plain);
|
||||
ush_write_char('\n');
|
||||
|
||||
ush_fastfetch_print_text(plain, "OS", "CLeonOS x86_64");
|
||||
ush_fastfetch_print_text(plain, "Shell", "User Shell (/shell/shell.elf)");
|
||||
ush_fastfetch_print_u64(plain, "PID", cleonos_sys_getpid());
|
||||
ush_fastfetch_print_u64(plain, "UptimeTicks", cleonos_sys_timer_ticks());
|
||||
ush_fastfetch_print_u64(plain, "Tasks", cleonos_sys_task_count());
|
||||
ush_fastfetch_print_u64(plain, "Services", cleonos_sys_service_count());
|
||||
ush_fastfetch_print_u64(plain, "SvcReady", cleonos_sys_service_ready_count());
|
||||
ush_fastfetch_print_u64(plain, "CtxSwitches", cleonos_sys_context_switches());
|
||||
ush_fastfetch_print_u64(plain, "KELFApps", cleonos_sys_kelf_count());
|
||||
ush_fastfetch_print_u64(plain, "KELFRuns", cleonos_sys_kelf_runs());
|
||||
ush_fastfetch_print_u64(plain, "FSNodes", cleonos_sys_fs_node_count());
|
||||
ush_fastfetch_print_u64(plain, "RootChildren", cleonos_sys_fs_child_count("/"));
|
||||
|
||||
ush_fastfetch_write_key(plain, "TTY");
|
||||
ush_fastfetch_write_u64_dec(tty_active);
|
||||
ush_write(" / ");
|
||||
ush_fastfetch_write_u64_dec(tty_count);
|
||||
ush_write_char('\n');
|
||||
|
||||
ush_fastfetch_write_key(plain, "ExecSuccess");
|
||||
ush_fastfetch_write_u64_dec(exec_ok);
|
||||
ush_write(" / ");
|
||||
ush_fastfetch_write_u64_dec(exec_req);
|
||||
ush_write_char('\n');
|
||||
|
||||
ush_fastfetch_print_u64(plain, "KbdBuffered", cleonos_sys_kbd_buffered());
|
||||
ush_fastfetch_print_palette(plain);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "fastfetch") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_fastfetch(arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
184
cleonos/c/apps/fg_main.c
Normal file
184
cleonos/c/apps/fg_main.c
Normal file
@@ -0,0 +1,184 @@
|
||||
#include "cmd_runtime.h"
|
||||
|
||||
static int ush_fg_is_user_path(const char *path) {
|
||||
if (path == (const char *)0 || path[0] != '/') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (path[1] == 's' && path[2] == 'y' && path[3] == 's' && path[4] == 't' && path[5] == 'e' && path[6] == 'm' &&
|
||||
(path[7] == '/' || path[7] == '\0')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (path[1] == 'd' && path[2] == 'r' && path[3] == 'i' && path[4] == 'v' && path[5] == 'e' && path[6] == 'r' &&
|
||||
(path[7] == '/' || path[7] == '\0')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ush_fg_pick_latest_job(u64 *out_pid) {
|
||||
u64 proc_count;
|
||||
u64 tty_active;
|
||||
u64 i;
|
||||
u64 best = 0ULL;
|
||||
|
||||
if (out_pid == (u64 *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*out_pid = 0ULL;
|
||||
proc_count = cleonos_sys_proc_count();
|
||||
tty_active = cleonos_sys_tty_active();
|
||||
|
||||
for (i = 0ULL; i < proc_count; i++) {
|
||||
u64 pid = 0ULL;
|
||||
cleonos_proc_snapshot snap;
|
||||
|
||||
if (cleonos_sys_proc_pid_at(i, &pid) == 0ULL || pid == 0ULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (cleonos_sys_proc_snapshot(pid, &snap, (u64)sizeof(snap)) == 0ULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (snap.tty_index != tty_active) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ush_fg_is_user_path(snap.path) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (snap.state != CLEONOS_PROC_STATE_PENDING && snap.state != CLEONOS_PROC_STATE_RUNNING &&
|
||||
snap.state != CLEONOS_PROC_STATE_STOPPED) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (best == 0ULL || snap.pid > best) {
|
||||
best = snap.pid;
|
||||
}
|
||||
}
|
||||
|
||||
if (best == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*out_pid = best;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ush_fg_wait_pid(u64 pid) {
|
||||
for (;;) {
|
||||
u64 status = (u64)-1;
|
||||
u64 wait_ret = cleonos_sys_wait_pid(pid, &status);
|
||||
|
||||
if (wait_ret == (u64)-1) {
|
||||
ush_writeln("fg: pid not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (wait_ret == 1ULL) {
|
||||
ush_write("fg: done [");
|
||||
ush_write_hex_u64(pid);
|
||||
ush_writeln("]");
|
||||
if ((status & (1ULL << 63)) != 0ULL) {
|
||||
ush_print_kv_hex(" SIGNAL", status & 0xFFULL);
|
||||
ush_print_kv_hex(" VECTOR", (status >> 8) & 0xFFULL);
|
||||
ush_print_kv_hex(" ERROR", (status >> 16) & 0xFFFFULL);
|
||||
} else {
|
||||
ush_print_kv_hex(" STATUS", status);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
(void)cleonos_sys_sleep_ticks(1ULL);
|
||||
}
|
||||
}
|
||||
|
||||
static int ush_cmd_fg(const char *arg) {
|
||||
u64 pid = 0ULL;
|
||||
cleonos_proc_snapshot snap;
|
||||
|
||||
if (arg != (const char *)0 && arg[0] != '\0') {
|
||||
if (ush_parse_u64_dec(arg, &pid) == 0 || pid == 0ULL) {
|
||||
ush_writeln("fg: usage fg [pid]");
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
if (ush_fg_pick_latest_job(&pid) == 0) {
|
||||
ush_writeln("fg: no active background job");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (cleonos_sys_proc_snapshot(pid, &snap, (u64)sizeof(snap)) == 0ULL) {
|
||||
ush_writeln("fg: pid not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (snap.state == CLEONOS_PROC_STATE_STOPPED) {
|
||||
u64 ret = cleonos_sys_proc_kill(pid, CLEONOS_SIGCONT);
|
||||
|
||||
if (ret == (u64)-1) {
|
||||
ush_writeln("fg: pid not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ret == 0ULL) {
|
||||
ush_writeln("fg: failed to continue job");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
ush_write("fg: waiting [");
|
||||
ush_write_hex_u64(pid);
|
||||
ush_writeln("]");
|
||||
return ush_fg_wait_pid(pid);
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "fg") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_fg(arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
@@ -1,6 +1,54 @@
|
||||
#include "shell/shell_internal.h"
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("fsstat");
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_fsstat(void) {
|
||||
ush_writeln("fsstat:");
|
||||
ush_print_kv_hex(" NODE_COUNT", cleonos_sys_fs_node_count());
|
||||
ush_print_kv_hex(" ROOT_CHILDREN", cleonos_sys_fs_child_count("/"));
|
||||
ush_print_kv_hex(" SYSTEM_CHILDREN", cleonos_sys_fs_child_count("/system"));
|
||||
ush_print_kv_hex(" SHELL_CHILDREN", cleonos_sys_fs_child_count("/shell"));
|
||||
ush_print_kv_hex(" TEMP_CHILDREN", cleonos_sys_fs_child_count("/temp"));
|
||||
ush_print_kv_hex(" DRIVER_CHILDREN", cleonos_sys_fs_child_count("/driver"));
|
||||
ush_print_kv_hex(" DEV_CHILDREN", cleonos_sys_fs_child_count("/dev"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "fsstat") != 0) {
|
||||
has_context = 1;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_fsstat();
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
248
cleonos/c/apps/grep_main.c
Normal file
248
cleonos/c/apps/grep_main.c
Normal file
@@ -0,0 +1,248 @@
|
||||
#include "cmd_runtime.h"
|
||||
#include <stdio.h>
|
||||
|
||||
static void ush_grep_write_u64_dec(u64 value) {
|
||||
char tmp[32];
|
||||
u64 len = 0ULL;
|
||||
|
||||
if (value == 0ULL) {
|
||||
(void)putchar('0');
|
||||
return;
|
||||
}
|
||||
|
||||
while (value > 0ULL && len < (u64)sizeof(tmp)) {
|
||||
tmp[len++] = (char)('0' + (value % 10ULL));
|
||||
value /= 10ULL;
|
||||
}
|
||||
|
||||
while (len > 0ULL) {
|
||||
len--;
|
||||
(void)putchar((unsigned char)tmp[len]);
|
||||
}
|
||||
}
|
||||
|
||||
static int ush_grep_line_has_pattern(const char *line, u64 line_len, const char *pattern, u64 pattern_len) {
|
||||
u64 i;
|
||||
|
||||
if (line == (const char *)0 || pattern == (const char *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (pattern_len == 0ULL) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (pattern_len > line_len) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0ULL; i + pattern_len <= line_len; i++) {
|
||||
u64 j = 0ULL;
|
||||
|
||||
while (j < pattern_len && line[i + j] == pattern[j]) {
|
||||
j++;
|
||||
}
|
||||
|
||||
if (j == pattern_len) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u64 ush_grep_emit_matches(const char *input, u64 input_len, const char *pattern, int with_line_number) {
|
||||
u64 matches = 0ULL;
|
||||
u64 line_no = 1ULL;
|
||||
u64 start = 0ULL;
|
||||
u64 i;
|
||||
u64 pattern_len;
|
||||
|
||||
if (input == (const char *)0 || pattern == (const char *)0) {
|
||||
return 0ULL;
|
||||
}
|
||||
|
||||
pattern_len = ush_strlen(pattern);
|
||||
|
||||
for (i = 0ULL; i <= input_len; i++) {
|
||||
if (i == input_len || input[i] == '\n') {
|
||||
u64 line_len = i - start;
|
||||
|
||||
if (ush_grep_line_has_pattern(&input[start], line_len, pattern, pattern_len) != 0) {
|
||||
u64 j;
|
||||
|
||||
matches++;
|
||||
|
||||
if (with_line_number != 0) {
|
||||
ush_grep_write_u64_dec(line_no);
|
||||
(void)fputs(":", 1);
|
||||
}
|
||||
|
||||
for (j = 0ULL; j < line_len; j++) {
|
||||
(void)putchar((unsigned char)input[start + j]);
|
||||
}
|
||||
|
||||
(void)putchar('\n');
|
||||
}
|
||||
|
||||
start = i + 1ULL;
|
||||
line_no++;
|
||||
}
|
||||
}
|
||||
|
||||
return matches;
|
||||
}
|
||||
|
||||
static int ush_cmd_grep(const ush_state *sh, const char *arg) {
|
||||
char first[USH_PATH_MAX];
|
||||
char second[USH_PATH_MAX];
|
||||
char third[USH_PATH_MAX];
|
||||
char path[USH_PATH_MAX];
|
||||
const char *rest = "";
|
||||
const char *rest2 = "";
|
||||
const char *pattern = (const char *)0;
|
||||
const char *file_arg = (const char *)0;
|
||||
const char *input = (const char *)0;
|
||||
u64 input_len = 0ULL;
|
||||
u64 size;
|
||||
u64 got;
|
||||
int with_line_number = 0;
|
||||
static char file_buf[USH_COPY_MAX + 1U];
|
||||
|
||||
if (sh == (const ush_state *)0 || arg == (const char *)0 || arg[0] == '\0') {
|
||||
(void)puts("grep: usage grep [-n] <pattern> [file]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_split_first_and_rest(arg, first, (u64)sizeof(first), &rest) == 0) {
|
||||
(void)puts("grep: usage grep [-n] <pattern> [file]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_streq(first, "-n") != 0) {
|
||||
with_line_number = 1;
|
||||
|
||||
if (ush_split_first_and_rest(rest, second, (u64)sizeof(second), &rest2) == 0) {
|
||||
(void)puts("grep: usage grep [-n] <pattern> [file]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
pattern = second;
|
||||
rest = rest2;
|
||||
} else {
|
||||
pattern = first;
|
||||
}
|
||||
|
||||
if (rest != (const char *)0 && rest[0] != '\0') {
|
||||
if (ush_split_first_and_rest(rest, third, (u64)sizeof(third), &rest2) == 0) {
|
||||
(void)puts("grep: usage grep [-n] <pattern> [file]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
file_arg = third;
|
||||
|
||||
if (rest2 != (const char *)0 && rest2[0] != '\0') {
|
||||
(void)puts("grep: usage grep [-n] <pattern> [file]");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (pattern == (const char *)0 || pattern[0] == '\0') {
|
||||
(void)puts("grep: pattern required");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (file_arg != (const char *)0) {
|
||||
if (ush_resolve_path(sh, file_arg, path, (u64)sizeof(path)) == 0) {
|
||||
(void)puts("grep: invalid path");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cleonos_sys_fs_stat_type(path) != 1ULL) {
|
||||
(void)puts("grep: file not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
size = cleonos_sys_fs_stat_size(path);
|
||||
|
||||
if (size == (u64)-1) {
|
||||
(void)puts("grep: failed to stat file");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (size > (u64)USH_COPY_MAX) {
|
||||
(void)puts("grep: file too large for user buffer");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (size == 0ULL) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
got = cleonos_sys_fs_read(path, file_buf, size);
|
||||
|
||||
if (got == 0ULL || got != size) {
|
||||
(void)puts("grep: read failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
file_buf[got] = '\0';
|
||||
input = file_buf;
|
||||
input_len = got;
|
||||
} else {
|
||||
if (ush_pipeline_stdin_text == (const char *)0) {
|
||||
(void)puts("grep: file path required (or pipeline input)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
input = ush_pipeline_stdin_text;
|
||||
input_len = ush_pipeline_stdin_len;
|
||||
}
|
||||
|
||||
(void)ush_grep_emit_matches(input, input_len, pattern, with_line_number);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "grep") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_grep(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
210
cleonos/c/apps/head_main.c
Normal file
210
cleonos/c/apps/head_main.c
Normal file
@@ -0,0 +1,210 @@
|
||||
#include "cmd_runtime.h"
|
||||
#include <stdio.h>
|
||||
|
||||
static int ush_head_parse_args(const char *arg, u64 *out_line_count, char *out_file, u64 out_file_size) {
|
||||
char first[USH_PATH_MAX];
|
||||
char second[USH_PATH_MAX];
|
||||
char third[USH_PATH_MAX];
|
||||
const char *rest = "";
|
||||
const char *rest2 = "";
|
||||
|
||||
if (out_line_count == (u64 *)0 || out_file == (char *)0 || out_file_size == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*out_line_count = 10ULL;
|
||||
out_file[0] = '\0';
|
||||
|
||||
if (arg == (const char *)0 || arg[0] == '\0') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ush_split_first_and_rest(arg, first, (u64)sizeof(first), &rest) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_streq(first, "-n") != 0) {
|
||||
if (ush_split_first_and_rest(rest, second, (u64)sizeof(second), &rest2) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_parse_u64_dec(second, out_line_count) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (rest2 != (const char *)0 && rest2[0] != '\0') {
|
||||
if (ush_split_first_and_rest(rest2, third, (u64)sizeof(third), &rest) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (rest != (const char *)0 && rest[0] != '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ush_copy(out_file, out_file_size, third);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (rest != (const char *)0 && rest[0] != '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ush_copy(out_file, out_file_size, first);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ush_head_load_input(const ush_state *sh, const char *file_arg, const char **out_input, u64 *out_input_len) {
|
||||
static char file_buf[USH_COPY_MAX + 1U];
|
||||
char path[USH_PATH_MAX];
|
||||
u64 size;
|
||||
u64 got;
|
||||
|
||||
if (sh == (const ush_state *)0 || out_input == (const char **)0 || out_input_len == (u64 *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*out_input = (const char *)0;
|
||||
*out_input_len = 0ULL;
|
||||
|
||||
if (file_arg != (const char *)0 && file_arg[0] != '\0') {
|
||||
if (ush_resolve_path(sh, file_arg, path, (u64)sizeof(path)) == 0) {
|
||||
(void)puts("head: invalid path");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cleonos_sys_fs_stat_type(path) != 1ULL) {
|
||||
(void)puts("head: file not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
size = cleonos_sys_fs_stat_size(path);
|
||||
|
||||
if (size == (u64)-1) {
|
||||
(void)puts("head: failed to stat file");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (size > (u64)USH_COPY_MAX) {
|
||||
(void)puts("head: file too large for user buffer");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (size == 0ULL) {
|
||||
file_buf[0] = '\0';
|
||||
*out_input = file_buf;
|
||||
*out_input_len = 0ULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
got = cleonos_sys_fs_read(path, file_buf, size);
|
||||
|
||||
if (got == 0ULL || got != size) {
|
||||
(void)puts("head: read failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
file_buf[got] = '\0';
|
||||
*out_input = file_buf;
|
||||
*out_input_len = got;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ush_pipeline_stdin_text == (const char *)0) {
|
||||
(void)puts("head: file path required (or pipeline input)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
*out_input = ush_pipeline_stdin_text;
|
||||
*out_input_len = ush_pipeline_stdin_len;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void ush_head_emit(const char *input, u64 input_len, u64 line_count) {
|
||||
u64 i;
|
||||
u64 emitted = 0ULL;
|
||||
|
||||
if (input == (const char *)0 || line_count == 0ULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0ULL; i < input_len; i++) {
|
||||
if (emitted >= line_count) {
|
||||
break;
|
||||
}
|
||||
|
||||
(void)putchar((unsigned char)input[i]);
|
||||
|
||||
if (input[i] == '\n') {
|
||||
emitted++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int ush_cmd_head(const ush_state *sh, const char *arg) {
|
||||
char file_arg[USH_PATH_MAX];
|
||||
const char *input = (const char *)0;
|
||||
u64 input_len = 0ULL;
|
||||
u64 line_count;
|
||||
|
||||
if (sh == (const ush_state *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_head_parse_args(arg, &line_count, file_arg, (u64)sizeof(file_arg)) == 0) {
|
||||
(void)puts("head: usage head [-n N] [file]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_head_load_input(sh, file_arg, &input, &input_len) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ush_head_emit(input, input_len, line_count);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "head") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_head(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
#include <cleonos_syscall.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
static const char msg[] = "[USER][HELLO] Hello world from /hello.elf\n";
|
||||
(void)cleonos_sys_tty_write(msg, (u64)(sizeof(msg) - 1U));
|
||||
(void)printf("[USER][HELLO] Hello world from %s\n", "/hello.elf");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,89 @@
|
||||
#include "shell/shell_internal.h"
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("help");
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_help(void) {
|
||||
ush_writeln("commands:");
|
||||
ush_writeln(" help");
|
||||
ush_writeln(" args [a b c] (print argc/argv/envp)");
|
||||
ush_writeln(" ls [-l] [-R] [path]");
|
||||
ush_writeln(" cat [file] (reads pipeline input when file omitted)");
|
||||
ush_writeln(" grep [-n] <pattern> [file]");
|
||||
ush_writeln(" head [-n N] [file] / tail [-n N] [file]");
|
||||
ush_writeln(" wc [file] / cut -d <char> -f <N> [file] / uniq [file] / sort [file]");
|
||||
ush_writeln(" pwd");
|
||||
ush_writeln(" cd [dir]");
|
||||
ush_writeln(" exec|run <path|name> [args...]");
|
||||
ush_writeln(" clear");
|
||||
ush_writeln(" ansi / ansitest / color");
|
||||
ush_writeln(" wavplay <file.wav> [steps] [ticks] / wavplay --stop");
|
||||
ush_writeln(" fastfetch [--plain]");
|
||||
ush_writeln(" doom [wad_path] (framebuffer bootstrap renderer)");
|
||||
ush_writeln(" memstat / fsstat / taskstat / userstat / shstat / stats");
|
||||
ush_writeln(" tty [index]");
|
||||
ush_writeln(" dmesg [n]");
|
||||
ush_writeln(" kbdstat");
|
||||
ush_writeln(" mkdir <dir> (/temp only)");
|
||||
ush_writeln(" touch <file> (/temp only)");
|
||||
ush_writeln(" write <file> <text> (/temp only, or from pipeline)");
|
||||
ush_writeln(" append <file> <text> (/temp only, or from pipeline)");
|
||||
ush_writeln(" cp <src> <dst> (dst /temp only)");
|
||||
ush_writeln(" mv <src> <dst> (/temp only)");
|
||||
ush_writeln(" rm <path> (/temp only)");
|
||||
ush_writeln(" pid");
|
||||
ush_writeln(" spawn <path|name> [args...] / bg <path|name> [args...]");
|
||||
ush_writeln(" wait <pid> / fg [pid]");
|
||||
ush_writeln(" kill <pid> [signal]");
|
||||
ush_writeln(" jobs [-a] / ps [-a] [-u] / procstat [pid|self] [-a]");
|
||||
ush_writeln(" top [--once] [-n loops] [-d ticks] / sysstat [-a] [-n N]");
|
||||
ush_writeln(" kdbg sym <addr> / kdbg bt <rbp> <rip> / kdbg regs");
|
||||
ush_writeln(" sleep <ticks>");
|
||||
ush_writeln(" spin (busy loop test for Alt+Ctrl+C)");
|
||||
ush_writeln(" yield");
|
||||
ush_writeln(" shutdown / restart");
|
||||
ush_writeln(" exit [code]");
|
||||
ush_writeln(" rusttest / panic / elfloader (kernel shell only)");
|
||||
ush_writeln("pipeline/redirection: cmd1 | cmd2 | cmd3 > /temp/out.txt");
|
||||
ush_writeln("redirection append: cmd >> /temp/out.txt");
|
||||
ush_writeln("edit keys: Left/Right, Home/End, Up/Down history");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "help") != 0) {
|
||||
has_context = 1;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_help();
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
145
cleonos/c/apps/jobs_main.c
Normal file
145
cleonos/c/apps/jobs_main.c
Normal file
@@ -0,0 +1,145 @@
|
||||
#include "cmd_runtime.h"
|
||||
|
||||
static int ush_jobs_is_user_path(const char *path) {
|
||||
if (path == (const char *)0 || path[0] != '/') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (path[1] == 's' && path[2] == 'y' && path[3] == 's' && path[4] == 't' && path[5] == 'e' && path[6] == 'm' &&
|
||||
(path[7] == '/' || path[7] == '\0')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (path[1] == 'd' && path[2] == 'r' && path[3] == 'i' && path[4] == 'v' && path[5] == 'e' && path[6] == 'r' &&
|
||||
(path[7] == '/' || path[7] == '\0')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const char *ush_jobs_state_name(u64 state) {
|
||||
if (state == CLEONOS_PROC_STATE_PENDING) {
|
||||
return "PENDING";
|
||||
}
|
||||
if (state == CLEONOS_PROC_STATE_RUNNING) {
|
||||
return "RUNNING";
|
||||
}
|
||||
if (state == CLEONOS_PROC_STATE_STOPPED) {
|
||||
return "STOPPED";
|
||||
}
|
||||
if (state == CLEONOS_PROC_STATE_EXITED) {
|
||||
return "EXITED ";
|
||||
}
|
||||
return "UNUSED ";
|
||||
}
|
||||
|
||||
static int ush_cmd_jobs(const char *arg) {
|
||||
u64 proc_count;
|
||||
u64 tty_active = cleonos_sys_tty_active();
|
||||
u64 i;
|
||||
u64 shown = 0ULL;
|
||||
int include_exited = 0;
|
||||
|
||||
if (arg != (const char *)0 && arg[0] != '\0') {
|
||||
if (ush_streq(arg, "-a") != 0 || ush_streq(arg, "--all") != 0) {
|
||||
include_exited = 1;
|
||||
} else {
|
||||
ush_writeln("jobs: usage jobs [-a|--all]");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
proc_count = cleonos_sys_proc_count();
|
||||
ush_writeln("jobs:");
|
||||
|
||||
for (i = 0ULL; i < proc_count; i++) {
|
||||
u64 pid = 0ULL;
|
||||
cleonos_proc_snapshot snap;
|
||||
const char *state_name;
|
||||
|
||||
if (cleonos_sys_proc_pid_at(i, &pid) == 0ULL || pid == 0ULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (cleonos_sys_proc_snapshot(pid, &snap, (u64)sizeof(snap)) == 0ULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ush_jobs_is_user_path(snap.path) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (snap.tty_index != tty_active) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (include_exited == 0 && snap.state == CLEONOS_PROC_STATE_EXITED) {
|
||||
continue;
|
||||
}
|
||||
|
||||
state_name = ush_jobs_state_name(snap.state);
|
||||
ush_write("[");
|
||||
ush_write_hex_u64(snap.pid);
|
||||
ush_write("] ");
|
||||
ush_write(state_name);
|
||||
ush_write(" ");
|
||||
ush_write(snap.path);
|
||||
if (snap.state == CLEONOS_PROC_STATE_EXITED) {
|
||||
ush_write(" status=");
|
||||
ush_write_hex_u64(snap.exit_status);
|
||||
}
|
||||
ush_write_char('\n');
|
||||
shown++;
|
||||
}
|
||||
|
||||
if (shown == 0ULL) {
|
||||
ush_writeln("(no jobs)");
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "jobs") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_jobs(arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
@@ -1,6 +1,52 @@
|
||||
#include "shell/shell_internal.h"
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("kbdstat");
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_kbdstat(void) {
|
||||
ush_writeln("kbdstat:");
|
||||
ush_print_kv_hex(" BUFFERED", cleonos_sys_kbd_buffered());
|
||||
ush_print_kv_hex(" PUSHED", cleonos_sys_kbd_pushed());
|
||||
ush_print_kv_hex(" POPPED", cleonos_sys_kbd_popped());
|
||||
ush_print_kv_hex(" DROPPED", cleonos_sys_kbd_dropped());
|
||||
ush_print_kv_hex(" HOTKEY_SWITCHES", cleonos_sys_kbd_hotkey_switches());
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "kbdstat") != 0) {
|
||||
has_context = 1;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_kbdstat();
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
268
cleonos/c/apps/kdbg_main.c
Normal file
268
cleonos/c/apps/kdbg_main.c
Normal file
@@ -0,0 +1,268 @@
|
||||
#include "cmd_runtime.h"
|
||||
|
||||
#define USH_KDBG_TEXT_MAX 2048ULL
|
||||
|
||||
static int ush_kdbg_is_hex(char ch) {
|
||||
if ((ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'f') || (ch >= 'A' && ch <= 'F')) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u64 ush_kdbg_hex_value(char ch) {
|
||||
if (ch >= '0' && ch <= '9') {
|
||||
return (u64)(ch - '0');
|
||||
}
|
||||
|
||||
if (ch >= 'a' && ch <= 'f') {
|
||||
return 10ULL + (u64)(ch - 'a');
|
||||
}
|
||||
|
||||
return 10ULL + (u64)(ch - 'A');
|
||||
}
|
||||
|
||||
static int ush_kdbg_parse_u64(const char *text, u64 *out_value) {
|
||||
u64 value = 0ULL;
|
||||
u64 i = 0ULL;
|
||||
int is_hex = 0;
|
||||
|
||||
if (text == (const char *)0 || out_value == (u64 *)0 || text[0] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (text[0] == '0' && (text[1] == 'x' || text[1] == 'X')) {
|
||||
i = 2ULL;
|
||||
is_hex = 1;
|
||||
} else if (text[0] == 'x' || text[0] == 'X') {
|
||||
i = 1ULL;
|
||||
is_hex = 1;
|
||||
}
|
||||
|
||||
if (is_hex != 0) {
|
||||
if (text[i] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (text[i] != '\0') {
|
||||
u64 digit;
|
||||
|
||||
if (ush_kdbg_is_hex(text[i]) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
digit = ush_kdbg_hex_value(text[i]);
|
||||
|
||||
if (value > ((0xFFFFFFFFFFFFFFFFULL - digit) >> 4U)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
value = (value << 4U) | digit;
|
||||
i++;
|
||||
}
|
||||
|
||||
*out_value = value;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return ush_parse_u64_dec(text, out_value);
|
||||
}
|
||||
|
||||
static int ush_kdbg_next_token(const char **io_cursor, char *out, u64 out_size) {
|
||||
const char *p;
|
||||
u64 n = 0ULL;
|
||||
|
||||
if (io_cursor == (const char **)0 || out == (char *)0 || out_size == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
p = *io_cursor;
|
||||
out[0] = '\0';
|
||||
|
||||
if (p == (const char *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (*p != '\0' && ush_is_space(*p) != 0) {
|
||||
p++;
|
||||
}
|
||||
|
||||
if (*p == '\0') {
|
||||
*io_cursor = p;
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (*p != '\0' && ush_is_space(*p) == 0) {
|
||||
if (n + 1ULL < out_size) {
|
||||
out[n++] = *p;
|
||||
}
|
||||
p++;
|
||||
}
|
||||
|
||||
out[n] = '\0';
|
||||
*io_cursor = p;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ush_kdbg_has_more_tokens(const char *cursor) {
|
||||
if (cursor == (const char *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (*cursor != '\0') {
|
||||
if (ush_is_space(*cursor) == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
cursor++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ush_kdbg_usage(void) {
|
||||
ush_writeln("usage:");
|
||||
ush_writeln(" kdbg sym <addr>");
|
||||
ush_writeln(" kdbg bt <rbp> <rip>");
|
||||
ush_writeln(" kdbg regs");
|
||||
}
|
||||
|
||||
static int ush_cmd_kdbg(const char *arg) {
|
||||
const char *cursor = arg;
|
||||
char subcmd[USH_CMD_MAX];
|
||||
char tok0[USH_PATH_MAX];
|
||||
char tok1[USH_PATH_MAX];
|
||||
char out[USH_KDBG_TEXT_MAX];
|
||||
u64 got;
|
||||
u64 value0;
|
||||
u64 value1;
|
||||
|
||||
if (ush_kdbg_next_token(&cursor, subcmd, (u64)sizeof(subcmd)) == 0) {
|
||||
ush_kdbg_usage();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_streq(subcmd, "sym") != 0) {
|
||||
if (ush_kdbg_next_token(&cursor, tok0, (u64)sizeof(tok0)) == 0 || ush_kdbg_has_more_tokens(cursor) != 0) {
|
||||
ush_kdbg_usage();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_kdbg_parse_u64(tok0, &value0) == 0) {
|
||||
ush_writeln("kdbg: invalid addr");
|
||||
return 0;
|
||||
}
|
||||
|
||||
got = cleonos_sys_kdbg_sym(value0, out, (u64)sizeof(out));
|
||||
|
||||
if (got == 0ULL) {
|
||||
ush_writeln("kdbg: sym failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
out[(u64)sizeof(out) - 1ULL] = '\0';
|
||||
ush_writeln(out);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ush_streq(subcmd, "bt") != 0) {
|
||||
if (ush_kdbg_next_token(&cursor, tok0, (u64)sizeof(tok0)) == 0 ||
|
||||
ush_kdbg_next_token(&cursor, tok1, (u64)sizeof(tok1)) == 0 || ush_kdbg_has_more_tokens(cursor) != 0) {
|
||||
ush_kdbg_usage();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_kdbg_parse_u64(tok0, &value0) == 0 || ush_kdbg_parse_u64(tok1, &value1) == 0) {
|
||||
ush_writeln("kdbg: invalid rbp/rip");
|
||||
return 0;
|
||||
}
|
||||
|
||||
got = cleonos_sys_kdbg_bt(value0, value1, out, (u64)sizeof(out));
|
||||
|
||||
if (got == 0ULL) {
|
||||
ush_writeln("kdbg: bt failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
out[(u64)sizeof(out) - 1ULL] = '\0';
|
||||
ush_write(out);
|
||||
if (got > (u64)sizeof(out) - 1ULL) {
|
||||
got = (u64)sizeof(out) - 1ULL;
|
||||
}
|
||||
if (got > 0ULL && out[got - 1ULL] != '\n') {
|
||||
ush_write_char('\n');
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ush_streq(subcmd, "regs") != 0) {
|
||||
if (ush_kdbg_has_more_tokens(cursor) != 0) {
|
||||
ush_kdbg_usage();
|
||||
return 0;
|
||||
}
|
||||
|
||||
got = cleonos_sys_kdbg_regs(out, (u64)sizeof(out));
|
||||
|
||||
if (got == 0ULL) {
|
||||
ush_writeln("kdbg: regs failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
out[(u64)sizeof(out) - 1ULL] = '\0';
|
||||
ush_write(out);
|
||||
if (got > (u64)sizeof(out) - 1ULL) {
|
||||
got = (u64)sizeof(out) - 1ULL;
|
||||
}
|
||||
if (got > 0ULL && out[got - 1ULL] != '\n') {
|
||||
ush_write_char('\n');
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
ush_kdbg_usage();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "kdbg") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_kdbg(arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
182
cleonos/c/apps/kill_main.c
Normal file
182
cleonos/c/apps/kill_main.c
Normal file
@@ -0,0 +1,182 @@
|
||||
#include "cmd_runtime.h"
|
||||
|
||||
static void ush_kill_upper_copy(char *dst, u64 dst_size, const char *src) {
|
||||
u64 i = 0ULL;
|
||||
|
||||
if (dst == (char *)0 || dst_size == 0ULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
dst[0] = '\0';
|
||||
|
||||
if (src == (const char *)0) {
|
||||
return;
|
||||
}
|
||||
|
||||
while (src[i] != '\0' && i + 1ULL < dst_size) {
|
||||
char ch = src[i];
|
||||
if (ch >= 'a' && ch <= 'z') {
|
||||
ch = (char)(ch - ('a' - 'A'));
|
||||
}
|
||||
dst[i] = ch;
|
||||
i++;
|
||||
}
|
||||
|
||||
dst[i] = '\0';
|
||||
}
|
||||
|
||||
static int ush_kill_parse_signal_name(const char *text, u64 *out_signal) {
|
||||
char name[32];
|
||||
u64 start = 0ULL;
|
||||
|
||||
if (text == (const char *)0 || out_signal == (u64 *)0 || text[0] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ush_kill_upper_copy(name, (u64)sizeof(name), text);
|
||||
|
||||
if (name[0] == '-') {
|
||||
start = 1ULL;
|
||||
}
|
||||
|
||||
if (name[start] == 'S' && name[start + 1ULL] == 'I' && name[start + 2ULL] == 'G') {
|
||||
start += 3ULL;
|
||||
}
|
||||
|
||||
if (name[start] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_streq(&name[start], "TERM") != 0) {
|
||||
*out_signal = CLEONOS_SIGTERM;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ush_streq(&name[start], "KILL") != 0) {
|
||||
*out_signal = CLEONOS_SIGKILL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ush_streq(&name[start], "STOP") != 0) {
|
||||
*out_signal = CLEONOS_SIGSTOP;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ush_streq(&name[start], "CONT") != 0) {
|
||||
*out_signal = CLEONOS_SIGCONT;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ush_kill_parse_signal(const char *text, u64 *out_signal) {
|
||||
u64 parsed = 0ULL;
|
||||
|
||||
if (text == (const char *)0 || out_signal == (u64 *)0 || text[0] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_parse_u64_dec(text, &parsed) != 0 && parsed <= 255ULL) {
|
||||
*out_signal = parsed;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return ush_kill_parse_signal_name(text, out_signal);
|
||||
}
|
||||
|
||||
static int ush_cmd_kill(const char *arg) {
|
||||
char pid_text[USH_PATH_MAX];
|
||||
char signal_text[USH_PATH_MAX];
|
||||
const char *rest = "";
|
||||
u64 pid;
|
||||
u64 signal = CLEONOS_SIGTERM;
|
||||
u64 ret;
|
||||
|
||||
if (arg == (const char *)0 || arg[0] == '\0') {
|
||||
ush_writeln("kill: usage kill <pid> [TERM|KILL|STOP|CONT|signal]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_split_first_and_rest(arg, pid_text, (u64)sizeof(pid_text), &rest) == 0) {
|
||||
ush_writeln("kill: usage kill <pid> [TERM|KILL|STOP|CONT|signal]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_parse_u64_dec(pid_text, &pid) == 0 || pid == 0ULL) {
|
||||
ush_writeln("kill: invalid pid");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (rest != (const char *)0 && rest[0] != '\0') {
|
||||
ush_copy(signal_text, (u64)sizeof(signal_text), rest);
|
||||
ush_trim_line(signal_text);
|
||||
if (ush_kill_parse_signal(signal_text, &signal) == 0) {
|
||||
ush_writeln("kill: invalid signal");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
ret = cleonos_sys_proc_kill(pid, signal);
|
||||
|
||||
if (ret == (u64)-1) {
|
||||
ush_writeln("kill: pid not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ret == 0ULL) {
|
||||
ush_writeln("kill: target cannot be terminated right now");
|
||||
return 0;
|
||||
}
|
||||
|
||||
ush_write("kill: sent signal ");
|
||||
ush_write_hex_u64(signal);
|
||||
ush_write(" to ");
|
||||
ush_write_hex_u64(pid);
|
||||
ush_write_char('\n');
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "kill") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_kill(arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
257
cleonos/c/apps/libctest_main.c
Normal file
257
cleonos/c/apps/libctest_main.c
Normal file
@@ -0,0 +1,257 @@
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static int g_total = 0;
|
||||
static int g_failed = 0;
|
||||
|
||||
static int test_vsnprintf(char *out, unsigned long out_size, const char *fmt, ...) {
|
||||
va_list args;
|
||||
int rc;
|
||||
|
||||
va_start(args, fmt);
|
||||
rc = vsnprintf(out, out_size, fmt, args);
|
||||
va_end(args);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void test_fail(const char *group, int line, const char *expr) {
|
||||
g_failed++;
|
||||
(void)printf("[libctest][FAIL] %s:%d %s\n", group, line, expr);
|
||||
}
|
||||
|
||||
#define TEST_ASSERT(group, expr) \
|
||||
do { \
|
||||
g_total++; \
|
||||
if (!(expr)) { \
|
||||
test_fail((group), __LINE__, #expr); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static void test_string_lib(void) {
|
||||
char buf[32];
|
||||
char src[16];
|
||||
char tok_text[32];
|
||||
char tok_text2[32];
|
||||
char *save = (char *)0;
|
||||
char *tok;
|
||||
void *ptr;
|
||||
|
||||
(void)memset(buf, 0xAA, sizeof(buf));
|
||||
ptr = memset(buf, 'x', 5U);
|
||||
TEST_ASSERT("string", ptr == buf);
|
||||
TEST_ASSERT("string", buf[0] == 'x' && buf[4] == 'x');
|
||||
TEST_ASSERT("string", memset((void *)0, 1, 4U) == (void *)0);
|
||||
|
||||
(void)memset(buf, 0, sizeof(buf));
|
||||
(void)strcpy(src, "abcdef");
|
||||
ptr = memcpy(buf, src, 6U);
|
||||
TEST_ASSERT("string", ptr == buf);
|
||||
TEST_ASSERT("string", memcmp(buf, "abcdef", 6U) == 0);
|
||||
TEST_ASSERT("string", memcpy((void *)0, src, 3U) == (void *)0);
|
||||
|
||||
(void)strcpy(buf, "abcdef");
|
||||
(void)memmove(buf + 2, buf, 4U);
|
||||
TEST_ASSERT("string", memcmp(buf, "ababcd", 6U) == 0);
|
||||
(void)strcpy(buf, "abcdef");
|
||||
(void)memmove(buf, buf + 2, 4U);
|
||||
TEST_ASSERT("string", memcmp(buf, "cdef", 4U) == 0);
|
||||
TEST_ASSERT("string", memmove((void *)0, src, 3U) == (void *)0);
|
||||
|
||||
TEST_ASSERT("string", memcmp("abc", "abc", 3U) == 0);
|
||||
TEST_ASSERT("string", memcmp("abc", "abd", 3U) < 0);
|
||||
TEST_ASSERT("string", memcmp("abe", "abd", 3U) > 0);
|
||||
TEST_ASSERT("string", memcmp((const void *)0, "a", 1U) < 0);
|
||||
TEST_ASSERT("string", memcmp("a", (const void *)0, 1U) > 0);
|
||||
|
||||
TEST_ASSERT("string", memchr("abc", 'b', 3U) == (const void *)("abc" + 1));
|
||||
TEST_ASSERT("string", memchr("abc", 'z', 3U) == (void *)0);
|
||||
TEST_ASSERT("string", memchr((const void *)0, 'a', 1U) == (void *)0);
|
||||
|
||||
TEST_ASSERT("string", strlen("abc") == 3U);
|
||||
TEST_ASSERT("string", strlen("") == 0U);
|
||||
TEST_ASSERT("string", strlen((const char *)0) == 0U);
|
||||
TEST_ASSERT("string", strnlen("abcdef", 3U) == 3U);
|
||||
TEST_ASSERT("string", strnlen("ab", 8U) == 2U);
|
||||
|
||||
(void)strcpy(buf, "hello");
|
||||
TEST_ASSERT("string", strcmp(buf, "hello") == 0);
|
||||
TEST_ASSERT("string", strcpy((char *)0, "x") == (char *)0);
|
||||
TEST_ASSERT("string", strcmp((const char *)0, "x") < 0);
|
||||
TEST_ASSERT("string", strcmp("x", (const char *)0) > 0);
|
||||
TEST_ASSERT("string", strcmp((const char *)0, (const char *)0) == 0);
|
||||
|
||||
(void)memset(buf, 'Z', 8U);
|
||||
(void)strncpy(buf, "hi", 6U);
|
||||
TEST_ASSERT("string", buf[0] == 'h' && buf[1] == 'i');
|
||||
TEST_ASSERT("string", buf[2] == '\0' && buf[5] == '\0');
|
||||
(void)strncpy(buf, "abcdef", 3U);
|
||||
TEST_ASSERT("string", buf[0] == 'a' && buf[1] == 'b' && buf[2] == 'c');
|
||||
TEST_ASSERT("string", strncmp("abc", "abd", 2U) == 0);
|
||||
TEST_ASSERT("string", strncmp("abc", "abd", 3U) < 0);
|
||||
TEST_ASSERT("string", strncmp((const char *)0, "a", 1U) < 0);
|
||||
|
||||
TEST_ASSERT("string", strchr("abc", 'b') == (char *)("abc" + 1));
|
||||
TEST_ASSERT("string", strchr("abc", '\0') == (char *)("abc" + 3));
|
||||
TEST_ASSERT("string", strchr((const char *)0, 'a') == (char *)0);
|
||||
TEST_ASSERT("string", strrchr("abca", 'a') == (char *)("abca" + 3));
|
||||
TEST_ASSERT("string", strrchr("abc", 'z') == (char *)0);
|
||||
|
||||
TEST_ASSERT("string", strstr("hello world", "world") == (char *)("hello world" + 6));
|
||||
TEST_ASSERT("string", strstr("abc", "") == (char *)"abc");
|
||||
TEST_ASSERT("string", strstr((const char *)0, "a") == (char *)0);
|
||||
TEST_ASSERT("string", strspn("abc123", "abc") == 3U);
|
||||
TEST_ASSERT("string", strspn((const char *)0, "abc") == 0U);
|
||||
TEST_ASSERT("string", strcspn("abc123", "123") == 3U);
|
||||
TEST_ASSERT("string", strcspn("abcdef", (const char *)0) == 0U);
|
||||
TEST_ASSERT("string", strpbrk("abcdef", "xzde") == (char *)("abcdef" + 3));
|
||||
TEST_ASSERT("string", strpbrk("abcdef", "XYZ") == (char *)0);
|
||||
|
||||
(void)strcpy(buf, "ab");
|
||||
(void)strcat(buf, "cd");
|
||||
TEST_ASSERT("string", strcmp(buf, "abcd") == 0);
|
||||
(void)strncat(buf, "efgh", 2U);
|
||||
TEST_ASSERT("string", strcmp(buf, "abcdef") == 0);
|
||||
TEST_ASSERT("string", strcat((char *)0, "x") == (char *)0);
|
||||
TEST_ASSERT("string", strncat((char *)0, "x", 1U) == (char *)0);
|
||||
|
||||
(void)strcpy(tok_text, "a,,b;c");
|
||||
tok = strtok_r(tok_text, ",;", &save);
|
||||
TEST_ASSERT("string", tok != (char *)0 && strcmp(tok, "a") == 0);
|
||||
tok = strtok_r((char *)0, ",;", &save);
|
||||
TEST_ASSERT("string", tok != (char *)0 && strcmp(tok, "b") == 0);
|
||||
tok = strtok_r((char *)0, ",;", &save);
|
||||
TEST_ASSERT("string", tok != (char *)0 && strcmp(tok, "c") == 0);
|
||||
tok = strtok_r((char *)0, ",;", &save);
|
||||
TEST_ASSERT("string", tok == (char *)0);
|
||||
TEST_ASSERT("string", strtok_r(tok_text, (const char *)0, &save) == (char *)0);
|
||||
TEST_ASSERT("string", strtok_r(tok_text, ",", (char **)0) == (char *)0);
|
||||
|
||||
(void)strcpy(tok_text2, "x y");
|
||||
tok = strtok(tok_text2, " ");
|
||||
TEST_ASSERT("string", tok != (char *)0 && strcmp(tok, "x") == 0);
|
||||
tok = strtok((char *)0, " ");
|
||||
TEST_ASSERT("string", tok != (char *)0 && strcmp(tok, "y") == 0);
|
||||
tok = strtok((char *)0, " ");
|
||||
TEST_ASSERT("string", tok == (char *)0);
|
||||
}
|
||||
|
||||
static void test_ctype_lib(void) {
|
||||
TEST_ASSERT("ctype", isspace(' ') != 0);
|
||||
TEST_ASSERT("ctype", isspace('\n') != 0);
|
||||
TEST_ASSERT("ctype", isspace('A') == 0);
|
||||
TEST_ASSERT("ctype", isdigit('0') != 0 && isdigit('9') != 0);
|
||||
TEST_ASSERT("ctype", isdigit('x') == 0);
|
||||
TEST_ASSERT("ctype", isalpha('a') != 0 && isalpha('Z') != 0);
|
||||
TEST_ASSERT("ctype", isalpha('1') == 0);
|
||||
TEST_ASSERT("ctype", isalnum('b') != 0 && isalnum('8') != 0);
|
||||
TEST_ASSERT("ctype", isalnum('#') == 0);
|
||||
TEST_ASSERT("ctype", isxdigit('f') != 0 && isxdigit('A') != 0 && isxdigit('9') != 0);
|
||||
TEST_ASSERT("ctype", isxdigit('g') == 0);
|
||||
TEST_ASSERT("ctype", isupper('Q') != 0 && isupper('q') == 0);
|
||||
TEST_ASSERT("ctype", islower('q') != 0 && islower('Q') == 0);
|
||||
TEST_ASSERT("ctype", isprint(' ') != 0 && isprint('~') != 0);
|
||||
TEST_ASSERT("ctype", isprint('\x1F') == 0);
|
||||
TEST_ASSERT("ctype", iscntrl('\n') != 0 && iscntrl(0x7F) != 0);
|
||||
TEST_ASSERT("ctype", iscntrl('A') == 0);
|
||||
TEST_ASSERT("ctype", tolower('A') == 'a');
|
||||
TEST_ASSERT("ctype", tolower('z') == 'z');
|
||||
TEST_ASSERT("ctype", toupper('a') == 'A');
|
||||
TEST_ASSERT("ctype", toupper('Z') == 'Z');
|
||||
}
|
||||
|
||||
static void test_stdlib_lib(void) {
|
||||
char *end = (char *)0;
|
||||
static const char no_digits[] = "xyz";
|
||||
int r1;
|
||||
int r2;
|
||||
|
||||
TEST_ASSERT("stdlib", abs(-7) == 7 && abs(5) == 5);
|
||||
TEST_ASSERT("stdlib", labs(-9L) == 9L && labs(6L) == 6L);
|
||||
TEST_ASSERT("stdlib", llabs(-11LL) == 11LL && llabs(4LL) == 4LL);
|
||||
TEST_ASSERT("stdlib", atoi("123") == 123);
|
||||
TEST_ASSERT("stdlib", atol("-456") == -456L);
|
||||
TEST_ASSERT("stdlib", atoll("789") == 789LL);
|
||||
|
||||
TEST_ASSERT("stdlib", strtol(" -42", &end, 10) == -42L && *end == '\0');
|
||||
TEST_ASSERT("stdlib", strtol("0x10", &end, 0) == 16L && *end == '\0');
|
||||
TEST_ASSERT("stdlib", strtol("077", &end, 0) == 63L && *end == '\0');
|
||||
TEST_ASSERT("stdlib", strtol(no_digits, &end, 10) == 0L && end == no_digits);
|
||||
TEST_ASSERT("stdlib", strtol("9999999999999999999999999", &end, 10) == LONG_MAX);
|
||||
TEST_ASSERT("stdlib", strtol("-9999999999999999999999999", &end, 10) == LONG_MIN);
|
||||
|
||||
TEST_ASSERT("stdlib", strtoul("42", &end, 10) == 42UL && *end == '\0');
|
||||
TEST_ASSERT("stdlib", strtoul("0x20", &end, 0) == 32UL && *end == '\0');
|
||||
TEST_ASSERT("stdlib", strtoul("-1", &end, 10) == ULONG_MAX);
|
||||
TEST_ASSERT("stdlib", strtoull("1234", &end, 10) == 1234ULL && *end == '\0');
|
||||
TEST_ASSERT("stdlib", strtoll("-1234", &end, 10) == -1234LL && *end == '\0');
|
||||
|
||||
srand(12345U);
|
||||
r1 = rand();
|
||||
r2 = rand();
|
||||
TEST_ASSERT("stdlib", r1 >= 0 && r1 <= RAND_MAX);
|
||||
TEST_ASSERT("stdlib", r2 >= 0 && r2 <= RAND_MAX);
|
||||
srand(12345U);
|
||||
TEST_ASSERT("stdlib", rand() == r1);
|
||||
TEST_ASSERT("stdlib", rand() == r2);
|
||||
}
|
||||
|
||||
static void test_stdio_lib(void) {
|
||||
char buf[64];
|
||||
int rc;
|
||||
int c;
|
||||
|
||||
rc = snprintf(buf, sizeof(buf), "A:%d B:%u C:%X %s", -7, 9U, 0x2AU, "ok");
|
||||
TEST_ASSERT("stdio", rc > 0);
|
||||
TEST_ASSERT("stdio", strcmp(buf, "A:-7 B:9 C:2A ok") == 0);
|
||||
|
||||
rc = snprintf(buf, 5UL, "abcdef");
|
||||
TEST_ASSERT("stdio", rc == 6);
|
||||
TEST_ASSERT("stdio", strcmp(buf, "abcd") == 0);
|
||||
|
||||
rc = snprintf(buf, sizeof(buf), "ptr=%p", (void *)buf);
|
||||
TEST_ASSERT("stdio", rc > 4);
|
||||
TEST_ASSERT("stdio", strstr(buf, "ptr=0x") == buf);
|
||||
|
||||
rc = snprintf(buf, sizeof(buf), "%s", (const char *)0);
|
||||
TEST_ASSERT("stdio", rc == 6);
|
||||
TEST_ASSERT("stdio", strcmp(buf, "(null)") == 0);
|
||||
|
||||
rc = test_vsnprintf(buf, sizeof(buf), "%lld/%llu", -12LL, 34ULL);
|
||||
TEST_ASSERT("stdio", rc == 6);
|
||||
TEST_ASSERT("stdio", strcmp(buf, "-12/34") == 0);
|
||||
|
||||
rc = snprintf((char *)0, 0UL, "abc");
|
||||
TEST_ASSERT("stdio", rc == 3);
|
||||
|
||||
rc = fputs("", 1);
|
||||
TEST_ASSERT("stdio", rc == 0);
|
||||
c = fputc('Z', 1);
|
||||
TEST_ASSERT("stdio", c == 'Z');
|
||||
rc = fprintf(1, "");
|
||||
TEST_ASSERT("stdio", rc == 0);
|
||||
rc = dprintf(-1, "x");
|
||||
TEST_ASSERT("stdio", rc == EOF);
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
(void)puts("[libctest] start");
|
||||
|
||||
test_string_lib();
|
||||
test_ctype_lib();
|
||||
test_stdlib_lib();
|
||||
test_stdio_lib();
|
||||
|
||||
(void)printf("[libctest] total=%d failed=%d\n", g_total, g_failed);
|
||||
|
||||
if (g_failed == 0) {
|
||||
(void)puts("[libctest] PASS");
|
||||
return 0;
|
||||
}
|
||||
|
||||
(void)puts("[libctest] FAIL");
|
||||
return 1;
|
||||
}
|
||||
24
cleonos/c/apps/libdemo_main.c
Normal file
24
cleonos/c/apps/libdemo_main.c
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
|
||||
typedef unsigned long long u64;
|
||||
|
||||
u64 cleonos_libdemo_add(u64 left, u64 right) {
|
||||
return left + right;
|
||||
}
|
||||
|
||||
u64 cleonos_libdemo_mul(u64 left, u64 right) {
|
||||
return left * right;
|
||||
}
|
||||
|
||||
u64 cleonos_libdemo_hello(void) {
|
||||
(void)puts("[libdemo] hello from libdemo.elf");
|
||||
return 0ULL;
|
||||
}
|
||||
|
||||
int cleonos_app_main(int argc, char **argv, char **envp) {
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
(void)envp;
|
||||
(void)puts("[libdemo] dynamic library image ready");
|
||||
return 0;
|
||||
}
|
||||
@@ -1,6 +1,344 @@
|
||||
#include "shell/shell_internal.h"
|
||||
#include "cmd_runtime.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("ls");
|
||||
static void clio_write(const char *text) {
|
||||
(void)fputs(text, 1);
|
||||
}
|
||||
|
||||
static void clio_writeln(const char *text) {
|
||||
(void)fputs(text, 1);
|
||||
(void)putchar('\n');
|
||||
}
|
||||
|
||||
static void clio_write_char(char ch) {
|
||||
(void)putchar((unsigned char)ch);
|
||||
}
|
||||
|
||||
static void clio_write_hex_u64(u64 value) {
|
||||
(void)printf("0X%llX", (unsigned long long)value);
|
||||
}
|
||||
|
||||
static int ush_ls_join_path(const char *dir_path, const char *name, char *out_path, u64 out_size) {
|
||||
u64 p = 0ULL;
|
||||
u64 i;
|
||||
|
||||
if (dir_path == (const char *)0 || name == (const char *)0 || out_path == (char *)0 || out_size == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (dir_path[0] == '/' && dir_path[1] == '\0') {
|
||||
if (out_size < 2ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out_path[p++] = '/';
|
||||
} else {
|
||||
for (i = 0ULL; dir_path[i] != '\0'; i++) {
|
||||
if (p + 1ULL >= out_size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out_path[p++] = dir_path[i];
|
||||
}
|
||||
|
||||
if (p == 0ULL || out_path[p - 1ULL] != '/') {
|
||||
if (p + 1ULL >= out_size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out_path[p++] = '/';
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0ULL; name[i] != '\0'; i++) {
|
||||
if (p + 1ULL >= out_size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out_path[p++] = name[i];
|
||||
}
|
||||
|
||||
out_path[p] = '\0';
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const char *ush_ls_basename(const char *path) {
|
||||
const char *name = path;
|
||||
u64 i = 0ULL;
|
||||
|
||||
if (path == (const char *)0 || path[0] == '\0') {
|
||||
return "";
|
||||
}
|
||||
|
||||
while (path[i] != '\0') {
|
||||
if (path[i] == '/' && path[i + 1ULL] != '\0') {
|
||||
name = &path[i + 1ULL];
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
static int ush_ls_is_dot_entry(const char *name) {
|
||||
if (name == (const char *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (name[0] == '.' && name[1] == '\0') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (name[0] == '.' && name[1] == '.' && name[2] == '\0') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ush_ls_print_one(const char *name, u64 type, u64 size, int long_mode) {
|
||||
if (long_mode == 0) {
|
||||
clio_writeln(name);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == 2ULL) {
|
||||
clio_write("d ");
|
||||
} else if (type == 1ULL) {
|
||||
clio_write("f ");
|
||||
} else {
|
||||
clio_write("? ");
|
||||
}
|
||||
|
||||
clio_write(name);
|
||||
|
||||
if (type == 1ULL) {
|
||||
clio_write(" size=");
|
||||
clio_write_hex_u64(size);
|
||||
} else if (type == 2ULL) {
|
||||
clio_write(" <DIR>");
|
||||
} else {
|
||||
clio_write(" <UNKNOWN>");
|
||||
}
|
||||
|
||||
clio_write_char('\n');
|
||||
}
|
||||
|
||||
static int ush_ls_parse_args(const char *arg, int *out_long_mode, int *out_recursive, char *out_target,
|
||||
u64 out_target_size) {
|
||||
char token[USH_PATH_MAX];
|
||||
u64 i = 0ULL;
|
||||
int path_set = 0;
|
||||
|
||||
if (out_long_mode == (int *)0 || out_recursive == (int *)0 || out_target == (char *)0 || out_target_size == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*out_long_mode = 0;
|
||||
*out_recursive = 0;
|
||||
ush_copy(out_target, out_target_size, ".");
|
||||
|
||||
if (arg == (const char *)0 || arg[0] == '\0') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
while (arg[i] != '\0') {
|
||||
u64 p = 0ULL;
|
||||
u64 j;
|
||||
|
||||
while (arg[i] != '\0' && ush_is_space(arg[i]) != 0) {
|
||||
i++;
|
||||
}
|
||||
|
||||
if (arg[i] == '\0') {
|
||||
break;
|
||||
}
|
||||
|
||||
while (arg[i] != '\0' && ush_is_space(arg[i]) == 0) {
|
||||
if (p + 1ULL < (u64)sizeof(token)) {
|
||||
token[p++] = arg[i];
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
token[p] = '\0';
|
||||
|
||||
if (token[0] == '-' && token[1] != '\0') {
|
||||
for (j = 1ULL; token[j] != '\0'; j++) {
|
||||
if (token[j] == 'l') {
|
||||
*out_long_mode = 1;
|
||||
} else if (token[j] == 'R') {
|
||||
*out_recursive = 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (path_set != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ush_copy(out_target, out_target_size, token);
|
||||
path_set = 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ush_ls_dir(const char *path, int long_mode, int recursive, int print_header, u64 depth) {
|
||||
u64 count;
|
||||
u64 i;
|
||||
|
||||
if (depth > 16ULL) {
|
||||
clio_writeln("ls: recursion depth limit reached");
|
||||
return 0;
|
||||
}
|
||||
|
||||
count = cleonos_sys_fs_child_count(path);
|
||||
|
||||
if (print_header != 0) {
|
||||
clio_write(path);
|
||||
clio_writeln(":");
|
||||
}
|
||||
|
||||
if (count == 0ULL) {
|
||||
clio_writeln("(empty)");
|
||||
}
|
||||
|
||||
for (i = 0ULL; i < count; i++) {
|
||||
char name[CLEONOS_FS_NAME_MAX];
|
||||
char child_path[USH_PATH_MAX];
|
||||
u64 type;
|
||||
u64 size = 0ULL;
|
||||
|
||||
name[0] = '\0';
|
||||
|
||||
if (cleonos_sys_fs_get_child_name(path, i, name) == 0ULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ush_ls_join_path(path, name, child_path, (u64)sizeof(child_path)) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
type = cleonos_sys_fs_stat_type(child_path);
|
||||
|
||||
if (type == 1ULL) {
|
||||
size = cleonos_sys_fs_stat_size(child_path);
|
||||
}
|
||||
|
||||
ush_ls_print_one(name, type, size, long_mode);
|
||||
}
|
||||
|
||||
if (recursive == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i = 0ULL; i < count; i++) {
|
||||
char name[CLEONOS_FS_NAME_MAX];
|
||||
char child_path[USH_PATH_MAX];
|
||||
|
||||
name[0] = '\0';
|
||||
|
||||
if (cleonos_sys_fs_get_child_name(path, i, name) == 0ULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ush_ls_is_dot_entry(name) != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ush_ls_join_path(path, name, child_path, (u64)sizeof(child_path)) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (cleonos_sys_fs_stat_type(child_path) == 2ULL) {
|
||||
clio_write_char('\n');
|
||||
(void)ush_ls_dir(child_path, long_mode, recursive, 1, depth + 1ULL);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ush_cmd_ls(const ush_state *sh, const char *arg) {
|
||||
char target[USH_PATH_MAX];
|
||||
char path[USH_PATH_MAX];
|
||||
u64 type;
|
||||
int long_mode;
|
||||
int recursive;
|
||||
|
||||
if (ush_ls_parse_args(arg, &long_mode, &recursive, target, (u64)sizeof(target)) == 0) {
|
||||
clio_writeln("ls: usage ls [-l] [-R] [path]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_resolve_path(sh, target, path, (u64)sizeof(path)) == 0) {
|
||||
clio_writeln("ls: invalid path");
|
||||
return 0;
|
||||
}
|
||||
|
||||
type = cleonos_sys_fs_stat_type(path);
|
||||
|
||||
if (type == 1ULL) {
|
||||
u64 size = cleonos_sys_fs_stat_size(path);
|
||||
ush_ls_print_one(ush_ls_basename(path), type, size, long_mode);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (type != 2ULL) {
|
||||
clio_writeln("ls: path not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ush_ls_dir(path, long_mode, recursive, recursive, 0ULL);
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "ls") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_ls(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,51 @@
|
||||
#include "shell/shell_internal.h"
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("memstat");
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_memstat(void) {
|
||||
ush_writeln("memstat (user ABI limited):");
|
||||
ush_print_kv_hex(" SERVICE_COUNT", cleonos_sys_service_count());
|
||||
ush_print_kv_hex(" SERVICE_READY_COUNT", cleonos_sys_service_ready_count());
|
||||
ush_print_kv_hex(" KELF_COUNT", cleonos_sys_kelf_count());
|
||||
ush_print_kv_hex(" KELF_RUNS", cleonos_sys_kelf_runs());
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "memstat") != 0) {
|
||||
has_context = 1;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_memstat();
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,70 @@
|
||||
#include "shell/shell_internal.h"
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_mkdir(const ush_state *sh, const char *arg) {
|
||||
char path[USH_PATH_MAX];
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("mkdir");
|
||||
if (arg == (const char *)0 || arg[0] == '\0') {
|
||||
ush_writeln("mkdir: directory path required");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_resolve_path(sh, arg, path, (u64)sizeof(path)) == 0) {
|
||||
ush_writeln("mkdir: invalid path");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_path_is_under_temp(path) == 0) {
|
||||
ush_writeln("mkdir: target must be under /temp");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cleonos_sys_fs_mkdir(path) == 0ULL) {
|
||||
ush_writeln("mkdir: failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "mkdir") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_mkdir(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,127 @@
|
||||
#include "shell/shell_internal.h"
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_copy_file(const char *src_path, const char *dst_path) {
|
||||
static char copy_buf[USH_COPY_MAX];
|
||||
u64 src_type;
|
||||
u64 src_size;
|
||||
u64 got;
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("mv");
|
||||
src_type = cleonos_sys_fs_stat_type(src_path);
|
||||
|
||||
if (src_type != 1ULL) {
|
||||
ush_writeln("cp: source file not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
src_size = cleonos_sys_fs_stat_size(src_path);
|
||||
|
||||
if (src_size == (u64)-1) {
|
||||
ush_writeln("cp: failed to stat source");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (src_size > (u64)USH_COPY_MAX) {
|
||||
ush_writeln("cp: source too large for user shell buffer");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (src_size == 0ULL) {
|
||||
got = 0ULL;
|
||||
} else {
|
||||
got = cleonos_sys_fs_read(src_path, copy_buf, src_size);
|
||||
|
||||
if (got == 0ULL || got != src_size) {
|
||||
ush_writeln("cp: failed to read source");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (cleonos_sys_fs_write(dst_path, copy_buf, got) == 0ULL) {
|
||||
ush_writeln("cp: failed to write destination");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ush_cmd_mv(const ush_state *sh, const char *arg) {
|
||||
char src_arg[USH_PATH_MAX];
|
||||
char dst_arg[USH_PATH_MAX];
|
||||
char src_path[USH_PATH_MAX];
|
||||
char dst_path[USH_PATH_MAX];
|
||||
|
||||
if (arg == (const char *)0 || arg[0] == '\0') {
|
||||
ush_writeln("mv: usage mv <src> <dst>");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_split_two_args(arg, src_arg, (u64)sizeof(src_arg), dst_arg, (u64)sizeof(dst_arg)) == 0) {
|
||||
ush_writeln("mv: usage mv <src> <dst>");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_resolve_path(sh, src_arg, src_path, (u64)sizeof(src_path)) == 0 ||
|
||||
ush_resolve_path(sh, dst_arg, dst_path, (u64)sizeof(dst_path)) == 0) {
|
||||
ush_writeln("mv: invalid path");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_path_is_under_temp(src_path) == 0 || ush_path_is_under_temp(dst_path) == 0) {
|
||||
ush_writeln("mv: source and destination must be under /temp");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_copy_file(src_path, dst_path) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cleonos_sys_fs_remove(src_path) == 0ULL) {
|
||||
ush_writeln("mv: source remove failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "mv") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_mv(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,47 @@
|
||||
#include "shell/shell_internal.h"
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("pid");
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_pid(void) {
|
||||
ush_print_kv_hex("PID", cleonos_sys_getpid());
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "pid") != 0) {
|
||||
has_context = 1;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_pid();
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
244
cleonos/c/apps/procstat_main.c
Normal file
244
cleonos/c/apps/procstat_main.c
Normal file
@@ -0,0 +1,244 @@
|
||||
#include "cmd_runtime.h"
|
||||
|
||||
static const char *ush_procstat_state_name(u64 state) {
|
||||
if (state == CLEONOS_PROC_STATE_PENDING) {
|
||||
return "PEND";
|
||||
}
|
||||
if (state == CLEONOS_PROC_STATE_RUNNING) {
|
||||
return "RUN ";
|
||||
}
|
||||
if (state == CLEONOS_PROC_STATE_STOPPED) {
|
||||
return "STOP";
|
||||
}
|
||||
if (state == CLEONOS_PROC_STATE_EXITED) {
|
||||
return "EXIT";
|
||||
}
|
||||
return "UNKN";
|
||||
}
|
||||
|
||||
static int ush_procstat_next_token(const char **io_cursor, char *out, u64 out_size) {
|
||||
const char *p;
|
||||
u64 n = 0ULL;
|
||||
|
||||
if (io_cursor == (const char **)0 || out == (char *)0 || out_size == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out[0] = '\0';
|
||||
p = *io_cursor;
|
||||
|
||||
if (p == (const char *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (*p != '\0' && ush_is_space(*p) != 0) {
|
||||
p++;
|
||||
}
|
||||
|
||||
if (*p == '\0') {
|
||||
*io_cursor = p;
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (*p != '\0' && ush_is_space(*p) == 0) {
|
||||
if (n + 1ULL < out_size) {
|
||||
out[n++] = *p;
|
||||
}
|
||||
p++;
|
||||
}
|
||||
|
||||
out[n] = '\0';
|
||||
*io_cursor = p;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void ush_procstat_print_line(const cleonos_proc_snapshot *snap) {
|
||||
if (snap == (const cleonos_proc_snapshot *)0) {
|
||||
return;
|
||||
}
|
||||
|
||||
ush_write("PID=");
|
||||
ush_write_hex_u64(snap->pid);
|
||||
ush_write(" ST=");
|
||||
ush_write(ush_procstat_state_name(snap->state));
|
||||
ush_write(" TTY=");
|
||||
ush_write_hex_u64(snap->tty_index);
|
||||
ush_write(" RT=");
|
||||
ush_write_hex_u64(snap->runtime_ticks);
|
||||
ush_write(" MEM=");
|
||||
ush_write_hex_u64(snap->mem_bytes);
|
||||
ush_write(" SIG=");
|
||||
ush_write_hex_u64(snap->last_signal);
|
||||
ush_write(" PATH=");
|
||||
ush_writeln(snap->path);
|
||||
}
|
||||
|
||||
static void ush_procstat_print_detail(const cleonos_proc_snapshot *snap) {
|
||||
if (snap == (const cleonos_proc_snapshot *)0) {
|
||||
return;
|
||||
}
|
||||
|
||||
ush_writeln("procstat:");
|
||||
ush_print_kv_hex(" PID", snap->pid);
|
||||
ush_print_kv_hex(" PPID", snap->ppid);
|
||||
ush_write(" STATE: ");
|
||||
ush_write(ush_procstat_state_name(snap->state));
|
||||
ush_write_char('\n');
|
||||
ush_print_kv_hex(" STATE_ID", snap->state);
|
||||
ush_print_kv_hex(" TTY", snap->tty_index);
|
||||
ush_print_kv_hex(" STARTED_TICK", snap->started_tick);
|
||||
ush_print_kv_hex(" EXITED_TICK", snap->exited_tick);
|
||||
ush_print_kv_hex(" RUNTIME_TICKS", snap->runtime_ticks);
|
||||
ush_print_kv_hex(" MEM_BYTES", snap->mem_bytes);
|
||||
ush_print_kv_hex(" EXIT_STATUS", snap->exit_status);
|
||||
ush_print_kv_hex(" LAST_SIGNAL", snap->last_signal);
|
||||
ush_print_kv_hex(" LAST_FAULT_VECTOR", snap->last_fault_vector);
|
||||
ush_print_kv_hex(" LAST_FAULT_ERROR", snap->last_fault_error);
|
||||
ush_print_kv_hex(" LAST_FAULT_RIP", snap->last_fault_rip);
|
||||
ush_write(" PATH: ");
|
||||
ush_writeln(snap->path);
|
||||
}
|
||||
|
||||
static int ush_procstat_parse_args(const char *arg, u64 *out_pid, int *out_has_pid, int *out_include_exited) {
|
||||
const char *cursor = arg;
|
||||
char token[USH_PATH_MAX];
|
||||
u64 parsed_pid = 0ULL;
|
||||
int has_pid = 0;
|
||||
int include_exited = 0;
|
||||
|
||||
if (out_pid == (u64 *)0 || out_has_pid == (int *)0 || out_include_exited == (int *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (ush_procstat_next_token(&cursor, token, (u64)sizeof(token)) != 0) {
|
||||
if (ush_streq(token, "-a") != 0 || ush_streq(token, "--all") != 0) {
|
||||
include_exited = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ush_streq(token, "self") != 0) {
|
||||
if (has_pid != 0) {
|
||||
return 0;
|
||||
}
|
||||
parsed_pid = cleonos_sys_getpid();
|
||||
has_pid = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ush_parse_u64_dec(token, &parsed_pid) != 0 && parsed_pid != 0ULL) {
|
||||
if (has_pid != 0) {
|
||||
return 0;
|
||||
}
|
||||
has_pid = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
*out_pid = parsed_pid;
|
||||
*out_has_pid = has_pid;
|
||||
*out_include_exited = include_exited;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ush_cmd_procstat(const char *arg) {
|
||||
u64 target_pid = 0ULL;
|
||||
int has_pid = 0;
|
||||
int include_exited = 0;
|
||||
|
||||
if (ush_procstat_parse_args(arg, &target_pid, &has_pid, &include_exited) == 0) {
|
||||
ush_writeln("procstat: usage procstat [pid|self] [-a|--all]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (has_pid != 0) {
|
||||
cleonos_proc_snapshot snap;
|
||||
|
||||
if (cleonos_sys_proc_snapshot(target_pid, &snap, (u64)sizeof(snap)) == 0ULL) {
|
||||
ush_writeln("procstat: pid not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
ush_procstat_print_detail(&snap);
|
||||
return 1;
|
||||
}
|
||||
|
||||
{
|
||||
u64 proc_count = cleonos_sys_proc_count();
|
||||
u64 i;
|
||||
u64 shown = 0ULL;
|
||||
|
||||
ush_writeln("procstat:");
|
||||
|
||||
for (i = 0ULL; i < proc_count; i++) {
|
||||
u64 pid = 0ULL;
|
||||
cleonos_proc_snapshot snap;
|
||||
|
||||
if (cleonos_sys_proc_pid_at(i, &pid) == 0ULL || pid == 0ULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (cleonos_sys_proc_snapshot(pid, &snap, (u64)sizeof(snap)) == 0ULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (include_exited == 0 && snap.state == CLEONOS_PROC_STATE_EXITED) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ush_procstat_print_line(&snap);
|
||||
shown++;
|
||||
}
|
||||
|
||||
if (shown == 0ULL) {
|
||||
ush_writeln("(no process)");
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "procstat") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_procstat(arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
194
cleonos/c/apps/ps_main.c
Normal file
194
cleonos/c/apps/ps_main.c
Normal file
@@ -0,0 +1,194 @@
|
||||
#include "cmd_runtime.h"
|
||||
|
||||
static int ush_ps_is_user_path(const char *path) {
|
||||
if (path == (const char *)0 || path[0] != '/') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (path[1] == 's' && path[2] == 'y' && path[3] == 's' && path[4] == 't' && path[5] == 'e' && path[6] == 'm' &&
|
||||
(path[7] == '/' || path[7] == '\0')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (path[1] == 'd' && path[2] == 'r' && path[3] == 'i' && path[4] == 'v' && path[5] == 'e' && path[6] == 'r' &&
|
||||
(path[7] == '/' || path[7] == '\0')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const char *ush_ps_state_name(u64 state) {
|
||||
if (state == CLEONOS_PROC_STATE_PENDING) {
|
||||
return "PEND";
|
||||
}
|
||||
if (state == CLEONOS_PROC_STATE_RUNNING) {
|
||||
return "RUN ";
|
||||
}
|
||||
if (state == CLEONOS_PROC_STATE_STOPPED) {
|
||||
return "STOP";
|
||||
}
|
||||
if (state == CLEONOS_PROC_STATE_EXITED) {
|
||||
return "EXIT";
|
||||
}
|
||||
return "UNKN";
|
||||
}
|
||||
|
||||
static int ush_ps_next_token(const char **io_cursor, char *out, u64 out_size) {
|
||||
const char *p;
|
||||
u64 n = 0ULL;
|
||||
|
||||
if (io_cursor == (const char **)0 || out == (char *)0 || out_size == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out[0] = '\0';
|
||||
p = *io_cursor;
|
||||
|
||||
if (p == (const char *)0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (*p != '\0' && ush_is_space(*p) != 0) {
|
||||
p++;
|
||||
}
|
||||
|
||||
if (*p == '\0') {
|
||||
*io_cursor = p;
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (*p != '\0' && ush_is_space(*p) == 0) {
|
||||
if (n + 1ULL < out_size) {
|
||||
out[n++] = *p;
|
||||
}
|
||||
p++;
|
||||
}
|
||||
|
||||
out[n] = '\0';
|
||||
*io_cursor = p;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void ush_ps_print_one(const cleonos_proc_snapshot *snap) {
|
||||
if (snap == (const cleonos_proc_snapshot *)0) {
|
||||
return;
|
||||
}
|
||||
|
||||
ush_write("PID=");
|
||||
ush_write_hex_u64(snap->pid);
|
||||
ush_write(" PPID=");
|
||||
ush_write_hex_u64(snap->ppid);
|
||||
ush_write(" ST=");
|
||||
ush_write(ush_ps_state_name(snap->state));
|
||||
ush_write(" TTY=");
|
||||
ush_write_hex_u64(snap->tty_index);
|
||||
ush_write(" RT=");
|
||||
ush_write_hex_u64(snap->runtime_ticks);
|
||||
ush_write(" MEM=");
|
||||
ush_write_hex_u64(snap->mem_bytes);
|
||||
if (snap->state == CLEONOS_PROC_STATE_EXITED) {
|
||||
ush_write(" EXIT=");
|
||||
ush_write_hex_u64(snap->exit_status);
|
||||
}
|
||||
ush_write(" PATH=");
|
||||
ush_writeln(snap->path);
|
||||
}
|
||||
|
||||
static int ush_cmd_ps(const char *arg) {
|
||||
u64 proc_count;
|
||||
u64 i;
|
||||
u64 shown = 0ULL;
|
||||
int include_exited = 0;
|
||||
int only_user = 0;
|
||||
const char *cursor = arg;
|
||||
char token[USH_PATH_MAX];
|
||||
|
||||
while (ush_ps_next_token(&cursor, token, (u64)sizeof(token)) != 0) {
|
||||
if (ush_streq(token, "-a") != 0 || ush_streq(token, "--all") != 0) {
|
||||
include_exited = 1;
|
||||
} else if (ush_streq(token, "-u") != 0 || ush_streq(token, "--user") != 0) {
|
||||
only_user = 1;
|
||||
} else {
|
||||
ush_writeln("ps: usage ps [-a|--all] [-u|--user]");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
proc_count = cleonos_sys_proc_count();
|
||||
ush_writeln("ps:");
|
||||
|
||||
for (i = 0ULL; i < proc_count; i++) {
|
||||
u64 pid = 0ULL;
|
||||
cleonos_proc_snapshot snap;
|
||||
|
||||
if (cleonos_sys_proc_pid_at(i, &pid) == 0ULL || pid == 0ULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (cleonos_sys_proc_snapshot(pid, &snap, (u64)sizeof(snap)) == 0ULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (include_exited == 0 && snap.state == CLEONOS_PROC_STATE_EXITED) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (only_user != 0 && ush_ps_is_user_path(snap.path) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ush_ps_print_one(&snap);
|
||||
shown++;
|
||||
}
|
||||
|
||||
if (shown == 0ULL) {
|
||||
ush_writeln("(no process)");
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "ps") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_ps(arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
@@ -1,6 +1,47 @@
|
||||
#include "shell/shell_internal.h"
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("pwd");
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_pwd(const ush_state *sh) {
|
||||
ush_writeln(sh->cwd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "pwd") != 0) {
|
||||
has_context = 1;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_pwd(&sh);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,48 @@
|
||||
#include "shell/shell_internal.h"
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("restart");
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_restart(void) {
|
||||
ush_writeln("restart: rebooting...");
|
||||
(void)cleonos_sys_restart();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "restart") != 0) {
|
||||
has_context = 1;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_restart();
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,70 @@
|
||||
#include "shell/shell_internal.h"
|
||||
#include "cmd_runtime.h"
|
||||
static int ush_cmd_rm(const ush_state *sh, const char *arg) {
|
||||
char path[USH_PATH_MAX];
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
return ush_command_program_main("rm");
|
||||
if (arg == (const char *)0 || arg[0] == '\0') {
|
||||
ush_writeln("rm: path required");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_resolve_path(sh, arg, path, (u64)sizeof(path)) == 0) {
|
||||
ush_writeln("rm: invalid path");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_path_is_under_temp(path) == 0) {
|
||||
ush_writeln("rm: target must be under /temp");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cleonos_sys_fs_remove(path) == 0ULL) {
|
||||
ush_writeln("rm: failed (directory must be empty)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int cleonos_app_main(void) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_cmd_ret ret;
|
||||
ush_state sh;
|
||||
char initial_cwd[USH_PATH_MAX];
|
||||
int has_context = 0;
|
||||
int success = 0;
|
||||
const char *arg = "";
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
ush_init_state(&sh);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ctx.cmd[0] != '\0' && ush_streq(ctx.cmd, "rm") != 0) {
|
||||
has_context = 1;
|
||||
arg = ctx.arg;
|
||||
if (ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
ush_copy(initial_cwd, (u64)sizeof(initial_cwd), sh.cwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
success = ush_cmd_rm(&sh, arg);
|
||||
|
||||
if (has_context != 0) {
|
||||
if (ush_streq(sh.cwd, initial_cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
return (success != 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,5 @@
|
||||
#include "shell_internal.h"
|
||||
|
||||
static int ush_dispatch_external_enabled = 1;
|
||||
|
||||
static void ush_zero(void *ptr, u64 size) {
|
||||
u64 i;
|
||||
char *bytes = (char *)ptr;
|
||||
@@ -15,6 +13,25 @@ static void ush_zero(void *ptr, u64 size) {
|
||||
}
|
||||
}
|
||||
|
||||
static void ush_append_text(char *dst, u64 dst_size, const char *text) {
|
||||
u64 p = 0ULL;
|
||||
u64 i = 0ULL;
|
||||
|
||||
if (dst == (char *)0 || dst_size == 0ULL || text == (const char *)0) {
|
||||
return;
|
||||
}
|
||||
|
||||
while (dst[p] != '\0' && p + 1ULL < dst_size) {
|
||||
p++;
|
||||
}
|
||||
|
||||
while (text[i] != '\0' && p + 1ULL < dst_size) {
|
||||
dst[p++] = text[i++];
|
||||
}
|
||||
|
||||
dst[p] = '\0';
|
||||
}
|
||||
|
||||
static const char *ush_alias_command(const char *cmd) {
|
||||
if (cmd == (const char *)0) {
|
||||
return (const char *)0;
|
||||
@@ -47,44 +64,6 @@ static const char *ush_alias_command(const char *cmd) {
|
||||
return cmd;
|
||||
}
|
||||
|
||||
static int ush_build_command_line(const char *cmd, const char *arg, char *out_line, u64 out_size) {
|
||||
u64 p = 0ULL;
|
||||
u64 i;
|
||||
|
||||
if (cmd == (const char *)0 || out_line == (char *)0 || out_size == 0ULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out_line[0] = '\0';
|
||||
|
||||
for (i = 0ULL; cmd[i] != '\0'; i++) {
|
||||
if (p + 1ULL >= out_size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out_line[p++] = cmd[i];
|
||||
}
|
||||
|
||||
if (arg != (const char *)0 && arg[0] != '\0') {
|
||||
if (p + 1ULL >= out_size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out_line[p++] = ' ';
|
||||
|
||||
for (i = 0ULL; arg[i] != '\0'; i++) {
|
||||
if (p + 1ULL >= out_size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
out_line[p++] = arg[i];
|
||||
}
|
||||
}
|
||||
|
||||
out_line[p] = '\0';
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ush_cmd_ret_apply(ush_state *sh, const ush_cmd_ret *ret) {
|
||||
if (sh == (ush_state *)0 || ret == (const ush_cmd_ret *)0) {
|
||||
return 0;
|
||||
@@ -102,10 +81,6 @@ static int ush_cmd_ret_apply(ush_state *sh, const ush_cmd_ret *ret) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
void ush_set_external_dispatch(int enabled) {
|
||||
ush_dispatch_external_enabled = (enabled != 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
int ush_command_ctx_write(const char *cmd, const char *arg, const char *cwd) {
|
||||
ush_cmd_ctx ctx;
|
||||
|
||||
@@ -162,9 +137,11 @@ int ush_command_ret_read(ush_cmd_ret *out_ret) {
|
||||
return (got == (u64)sizeof(*out_ret)) ? 1 : 0;
|
||||
}
|
||||
|
||||
int ush_try_exec_external(ush_state *sh, const char *cmd, const char *arg, int *out_success) {
|
||||
int ush_try_exec_external_with_fds(ush_state *sh, const char *cmd, const char *arg, u64 stdin_fd, u64 stdout_fd,
|
||||
u64 stderr_fd, int *out_success) {
|
||||
const char *canonical;
|
||||
char path[USH_PATH_MAX];
|
||||
char env_line[USH_PATH_MAX + USH_CMD_MAX + 96ULL];
|
||||
u64 status;
|
||||
ush_cmd_ret ret;
|
||||
|
||||
@@ -176,10 +153,6 @@ int ush_try_exec_external(ush_state *sh, const char *cmd, const char *arg, int *
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ush_dispatch_external_enabled == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
canonical = ush_alias_command(cmd);
|
||||
|
||||
if (canonical == (const char *)0) {
|
||||
@@ -201,7 +174,17 @@ int ush_try_exec_external(ush_state *sh, const char *cmd, const char *arg, int *
|
||||
return 1;
|
||||
}
|
||||
|
||||
status = cleonos_sys_exec_path(path);
|
||||
env_line[0] = '\0';
|
||||
ush_append_text(env_line, (u64)sizeof(env_line), "PWD=");
|
||||
ush_append_text(env_line, (u64)sizeof(env_line), sh->cwd);
|
||||
ush_append_text(env_line, (u64)sizeof(env_line), ";CMD=");
|
||||
ush_append_text(env_line, (u64)sizeof(env_line), canonical);
|
||||
|
||||
if (stdin_fd != CLEONOS_FD_INHERIT) {
|
||||
ush_append_text(env_line, (u64)sizeof(env_line), ";USH_STDIN_MODE=PIPE");
|
||||
}
|
||||
|
||||
status = cleonos_sys_exec_pathv_io(path, arg, env_line, stdin_fd, stdout_fd, stderr_fd);
|
||||
|
||||
if (status == (u64)-1) {
|
||||
ush_writeln("exec: request failed");
|
||||
@@ -217,7 +200,15 @@ int ush_try_exec_external(ush_state *sh, const char *cmd, const char *arg, int *
|
||||
(void)cleonos_sys_fs_remove(USH_CMD_RET_PATH);
|
||||
|
||||
if (status != 0ULL) {
|
||||
ush_writeln("exec: returned non-zero status");
|
||||
if ((status & (1ULL << 63)) != 0ULL) {
|
||||
ush_writeln("exec: terminated by signal");
|
||||
ush_print_kv_hex(" SIGNAL", status & 0xFFULL);
|
||||
ush_print_kv_hex(" VECTOR", (status >> 8) & 0xFFULL);
|
||||
ush_print_kv_hex(" ERROR", (status >> 16) & 0xFFFFULL);
|
||||
} else {
|
||||
ush_writeln("exec: returned non-zero status");
|
||||
ush_print_kv_hex(" STATUS", status);
|
||||
}
|
||||
|
||||
if (out_success != (int *)0) {
|
||||
*out_success = 0;
|
||||
@@ -233,65 +224,7 @@ int ush_try_exec_external(ush_state *sh, const char *cmd, const char *arg, int *
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ush_command_program_main(const char *command_name) {
|
||||
ush_cmd_ctx ctx;
|
||||
ush_state sh;
|
||||
ush_cmd_ret ret;
|
||||
char line[USH_LINE_MAX];
|
||||
u64 ok_before;
|
||||
int success;
|
||||
int has_context = 0;
|
||||
int use_ctx_cwd = 0;
|
||||
|
||||
if (command_name == (const char *)0 || command_name[0] == '\0') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
ush_zero(&ctx, (u64)sizeof(ctx));
|
||||
|
||||
if (ush_command_ctx_read(&ctx) != 0) {
|
||||
if (ush_streq(ctx.cmd, command_name) != 0) {
|
||||
has_context = 1;
|
||||
use_ctx_cwd = 1;
|
||||
} else if (ctx.cwd[0] == '/') {
|
||||
use_ctx_cwd = 1;
|
||||
ctx.arg[0] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
ush_init_state(&sh);
|
||||
ush_set_external_dispatch(0);
|
||||
|
||||
if (use_ctx_cwd != 0 && ctx.cwd[0] == '/') {
|
||||
ush_copy(sh.cwd, (u64)sizeof(sh.cwd), ctx.cwd);
|
||||
}
|
||||
|
||||
if (ush_build_command_line(command_name, ctx.arg, line, (u64)sizeof(line)) == 0) {
|
||||
ush_set_external_dispatch(1);
|
||||
ush_writeln("command line too long");
|
||||
return 1;
|
||||
}
|
||||
|
||||
ok_before = sh.cmd_ok;
|
||||
ush_execute_line(&sh, line);
|
||||
success = (sh.cmd_ok > ok_before) ? 1 : 0;
|
||||
|
||||
if (has_context != 0) {
|
||||
ush_zero(&ret, (u64)sizeof(ret));
|
||||
|
||||
if (ush_streq(sh.cwd, ctx.cwd) == 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_CWD;
|
||||
ush_copy(ret.cwd, (u64)sizeof(ret.cwd), sh.cwd);
|
||||
}
|
||||
|
||||
if (sh.exit_requested != 0) {
|
||||
ret.flags |= USH_CMD_RET_FLAG_EXIT;
|
||||
ret.exit_code = sh.exit_code;
|
||||
}
|
||||
|
||||
(void)ush_command_ret_write(&ret);
|
||||
}
|
||||
|
||||
ush_set_external_dispatch(1);
|
||||
return (success != 0) ? 0 : 1;
|
||||
int ush_try_exec_external(ush_state *sh, const char *cmd, const char *arg, int *out_success) {
|
||||
return ush_try_exec_external_with_fds(sh, cmd, arg, CLEONOS_FD_INHERIT, CLEONOS_FD_INHERIT, CLEONOS_FD_INHERIT,
|
||||
out_success);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,208 @@
|
||||
#include "shell_internal.h"
|
||||
|
||||
static char ush_input_clipboard[USH_LINE_MAX];
|
||||
static u64 ush_input_clipboard_len = 0ULL;
|
||||
static u64 ush_input_sel_start = 0ULL;
|
||||
static u64 ush_input_sel_end = 0ULL;
|
||||
static int ush_input_sel_active = 0;
|
||||
static u64 ush_input_sel_anchor = 0ULL;
|
||||
static int ush_input_sel_anchor_valid = 0;
|
||||
#define USH_RENDER_BUF_MAX 4096ULL
|
||||
#define USH_RENDER_EMIT_CHUNK 2000ULL
|
||||
|
||||
static void ush_input_selection_clear(void) {
|
||||
ush_input_sel_active = 0;
|
||||
ush_input_sel_start = 0ULL;
|
||||
ush_input_sel_end = 0ULL;
|
||||
ush_input_sel_anchor = 0ULL;
|
||||
ush_input_sel_anchor_valid = 0;
|
||||
}
|
||||
|
||||
static void ush_input_selection_select_all(const ush_state *sh) {
|
||||
if (sh == (const ush_state *)0 || sh->line_len == 0ULL) {
|
||||
ush_input_selection_clear();
|
||||
return;
|
||||
}
|
||||
|
||||
ush_input_sel_active = 1;
|
||||
ush_input_sel_start = 0ULL;
|
||||
ush_input_sel_end = sh->line_len;
|
||||
ush_input_sel_anchor = 0ULL;
|
||||
ush_input_sel_anchor_valid = 1;
|
||||
}
|
||||
|
||||
static void ush_input_selection_update_from_anchor(const ush_state *sh) {
|
||||
u64 anchor;
|
||||
|
||||
if (sh == (const ush_state *)0 || ush_input_sel_anchor_valid == 0) {
|
||||
ush_input_sel_active = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
anchor = ush_input_sel_anchor;
|
||||
if (anchor > sh->line_len) {
|
||||
anchor = sh->line_len;
|
||||
}
|
||||
|
||||
if (sh->cursor == anchor) {
|
||||
ush_input_sel_active = 0;
|
||||
ush_input_sel_start = anchor;
|
||||
ush_input_sel_end = anchor;
|
||||
return;
|
||||
}
|
||||
|
||||
ush_input_sel_active = 1;
|
||||
|
||||
if (sh->cursor < anchor) {
|
||||
ush_input_sel_start = sh->cursor;
|
||||
ush_input_sel_end = anchor;
|
||||
} else {
|
||||
ush_input_sel_start = anchor;
|
||||
ush_input_sel_end = sh->cursor;
|
||||
}
|
||||
}
|
||||
static int ush_input_selection_has_range(const ush_state *sh, u64 *out_start, u64 *out_end) {
|
||||
u64 start;
|
||||
u64 end;
|
||||
|
||||
if (sh == (const ush_state *)0 || ush_input_sel_active == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
start = ush_input_sel_start;
|
||||
end = ush_input_sel_end;
|
||||
|
||||
if (start > sh->line_len) {
|
||||
start = sh->line_len;
|
||||
}
|
||||
|
||||
if (end > sh->line_len) {
|
||||
end = sh->line_len;
|
||||
}
|
||||
|
||||
if (start > end) {
|
||||
u64 tmp = start;
|
||||
start = end;
|
||||
end = tmp;
|
||||
}
|
||||
|
||||
if (start == end) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (out_start != (u64 *)0) {
|
||||
*out_start = start;
|
||||
}
|
||||
|
||||
if (out_end != (u64 *)0) {
|
||||
*out_end = end;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void ush_input_delete_range(ush_state *sh, u64 start, u64 end) {
|
||||
u64 delta;
|
||||
u64 i;
|
||||
|
||||
if (sh == (ush_state *)0 || start >= end || start >= sh->line_len) {
|
||||
ush_input_selection_clear();
|
||||
return;
|
||||
}
|
||||
|
||||
if (end > sh->line_len) {
|
||||
end = sh->line_len;
|
||||
}
|
||||
|
||||
delta = end - start;
|
||||
|
||||
for (i = start; i + delta <= sh->line_len; i++) {
|
||||
sh->line[i] = sh->line[i + delta];
|
||||
}
|
||||
|
||||
sh->line_len -= delta;
|
||||
|
||||
if (sh->cursor > end) {
|
||||
sh->cursor -= delta;
|
||||
} else if (sh->cursor > start) {
|
||||
sh->cursor = start;
|
||||
}
|
||||
|
||||
if (sh->cursor > sh->line_len) {
|
||||
sh->cursor = sh->line_len;
|
||||
}
|
||||
|
||||
ush_input_selection_clear();
|
||||
}
|
||||
|
||||
static int ush_input_delete_selection(ush_state *sh) {
|
||||
u64 start;
|
||||
u64 end;
|
||||
|
||||
if (ush_input_selection_has_range(sh, &start, &end) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ush_input_delete_range(sh, start, end);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void ush_input_copy_selection(const ush_state *sh) {
|
||||
u64 start;
|
||||
u64 end;
|
||||
u64 len;
|
||||
u64 i;
|
||||
|
||||
if (ush_input_selection_has_range(sh, &start, &end) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
len = end - start;
|
||||
if (len > USH_LINE_MAX - 1ULL) {
|
||||
len = USH_LINE_MAX - 1ULL;
|
||||
}
|
||||
|
||||
for (i = 0ULL; i < len; i++) {
|
||||
ush_input_clipboard[i] = sh->line[start + i];
|
||||
}
|
||||
|
||||
ush_input_clipboard[len] = '\0';
|
||||
ush_input_clipboard_len = len;
|
||||
}
|
||||
|
||||
static void ush_input_insert_text(ush_state *sh, const char *text, u64 text_len) {
|
||||
u64 available;
|
||||
u64 i;
|
||||
|
||||
if (sh == (ush_state *)0 || text == (const char *)0 || text_len == 0ULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (sh->cursor > sh->line_len) {
|
||||
sh->cursor = sh->line_len;
|
||||
}
|
||||
|
||||
available = (USH_LINE_MAX - 1ULL) - sh->line_len;
|
||||
if (text_len > available) {
|
||||
text_len = available;
|
||||
}
|
||||
|
||||
if (text_len == 0ULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = sh->line_len + 1ULL; i > sh->cursor; i--) {
|
||||
sh->line[i + text_len - 1ULL] = sh->line[i - 1ULL];
|
||||
}
|
||||
|
||||
for (i = 0ULL; i < text_len; i++) {
|
||||
sh->line[sh->cursor + i] = text[i];
|
||||
}
|
||||
|
||||
sh->line_len += text_len;
|
||||
sh->cursor += text_len;
|
||||
}
|
||||
|
||||
static void ush_history_cancel_nav(ush_state *sh) {
|
||||
if (sh == (ush_state *)0) {
|
||||
return;
|
||||
@@ -20,6 +223,7 @@ static void ush_reset_line(ush_state *sh) {
|
||||
sh->cursor = 0ULL;
|
||||
sh->rendered_len = 0ULL;
|
||||
sh->line[0] = '\0';
|
||||
ush_input_selection_clear();
|
||||
}
|
||||
|
||||
static void ush_load_line(ush_state *sh, const char *line) {
|
||||
@@ -35,32 +239,131 @@ static void ush_load_line(ush_state *sh, const char *line) {
|
||||
ush_copy(sh->line, (u64)sizeof(sh->line), line);
|
||||
sh->line_len = ush_strlen(sh->line);
|
||||
sh->cursor = sh->line_len;
|
||||
ush_input_selection_clear();
|
||||
}
|
||||
|
||||
static void ush_render_buf_append_char(char *out, u64 out_size, u64 *io_len, char ch) {
|
||||
if (out == (char *)0 || io_len == (u64 *)0 || out_size == 0ULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (*io_len + 1ULL >= out_size) {
|
||||
return;
|
||||
}
|
||||
|
||||
out[*io_len] = ch;
|
||||
*io_len += 1ULL;
|
||||
}
|
||||
|
||||
static void ush_render_buf_append_text(char *out, u64 out_size, u64 *io_len, const char *text) {
|
||||
u64 i = 0ULL;
|
||||
|
||||
if (text == (const char *)0) {
|
||||
return;
|
||||
}
|
||||
|
||||
while (text[i] != '\0') {
|
||||
ush_render_buf_append_char(out, out_size, io_len, text[i]);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
static void ush_render_buf_append_prompt(const ush_state *sh, char *out, u64 out_size, u64 *io_len) {
|
||||
ush_render_buf_append_text(out, out_size, io_len, "\x1B[96mcleonos\x1B[0m(\x1B[92muser\x1B[0m");
|
||||
|
||||
if (sh == (const ush_state *)0) {
|
||||
ush_render_buf_append_text(out, out_size, io_len, ")> ");
|
||||
return;
|
||||
}
|
||||
|
||||
ush_render_buf_append_text(out, out_size, io_len, ":\x1B[93m");
|
||||
ush_render_buf_append_text(out, out_size, io_len, sh->cwd);
|
||||
ush_render_buf_append_text(out, out_size, io_len, "\x1B[0m)> ");
|
||||
}
|
||||
|
||||
static void ush_render_buf_append_line_segment(const ush_state *sh, u64 limit, char *out, u64 out_size, u64 *io_len) {
|
||||
u64 i;
|
||||
u64 sel_start = 0ULL;
|
||||
u64 sel_end = 0ULL;
|
||||
int has_sel;
|
||||
int inverse_on = 0;
|
||||
|
||||
if (sh == (const ush_state *)0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (limit > sh->line_len) {
|
||||
limit = sh->line_len;
|
||||
}
|
||||
|
||||
has_sel = ush_input_selection_has_range(sh, &sel_start, &sel_end);
|
||||
|
||||
for (i = 0ULL; i < limit; i++) {
|
||||
if (has_sel != 0 && inverse_on == 0 && i == sel_start) {
|
||||
ush_render_buf_append_text(out, out_size, io_len, "\x1B[7m");
|
||||
inverse_on = 1;
|
||||
}
|
||||
|
||||
if (has_sel != 0 && inverse_on != 0 && i == sel_end) {
|
||||
ush_render_buf_append_text(out, out_size, io_len, "\x1B[27m");
|
||||
inverse_on = 0;
|
||||
}
|
||||
|
||||
ush_render_buf_append_char(out, out_size, io_len, sh->line[i]);
|
||||
}
|
||||
|
||||
if (inverse_on != 0) {
|
||||
ush_render_buf_append_text(out, out_size, io_len, "\x1B[27m");
|
||||
}
|
||||
}
|
||||
|
||||
static void ush_render_emit(const char *buffer, u64 length) {
|
||||
u64 offset = 0ULL;
|
||||
|
||||
if (buffer == (const char *)0 || length == 0ULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
while (offset < length) {
|
||||
u64 chunk = length - offset;
|
||||
u64 written;
|
||||
|
||||
if (chunk > USH_RENDER_EMIT_CHUNK) {
|
||||
chunk = USH_RENDER_EMIT_CHUNK;
|
||||
}
|
||||
|
||||
written = cleonos_sys_fd_write(1ULL, buffer + offset, chunk);
|
||||
|
||||
if (written == 0ULL || written == (u64)-1) {
|
||||
break;
|
||||
}
|
||||
|
||||
offset += written;
|
||||
}
|
||||
}
|
||||
|
||||
static void ush_render_line(ush_state *sh) {
|
||||
char render[USH_RENDER_BUF_MAX];
|
||||
u64 out_len = 0ULL;
|
||||
u64 i;
|
||||
|
||||
if (sh == (ush_state *)0) {
|
||||
return;
|
||||
}
|
||||
|
||||
ush_write_char('\r');
|
||||
ush_prompt(sh);
|
||||
|
||||
for (i = 0ULL; i < sh->line_len; i++) {
|
||||
ush_write_char(sh->line[i]);
|
||||
}
|
||||
ush_render_buf_append_char(render, (u64)sizeof(render), &out_len, '\r');
|
||||
ush_render_buf_append_prompt(sh, render, (u64)sizeof(render), &out_len);
|
||||
ush_render_buf_append_line_segment(sh, sh->line_len, render, (u64)sizeof(render), &out_len);
|
||||
|
||||
for (i = sh->line_len; i < sh->rendered_len; i++) {
|
||||
ush_write_char(' ');
|
||||
ush_render_buf_append_char(render, (u64)sizeof(render), &out_len, ' ');
|
||||
}
|
||||
|
||||
ush_write_char('\r');
|
||||
ush_prompt(sh);
|
||||
ush_render_buf_append_char(render, (u64)sizeof(render), &out_len, '\r');
|
||||
ush_render_buf_append_prompt(sh, render, (u64)sizeof(render), &out_len);
|
||||
ush_render_buf_append_line_segment(sh, sh->cursor, render, (u64)sizeof(render), &out_len);
|
||||
|
||||
for (i = 0ULL; i < sh->cursor; i++) {
|
||||
ush_write_char(sh->line[i]);
|
||||
}
|
||||
ush_render_emit(render, out_len);
|
||||
|
||||
sh->rendered_len = sh->line_len;
|
||||
}
|
||||
@@ -131,6 +434,7 @@ static void ush_history_apply_current(ush_state *sh) {
|
||||
if (sh->cursor > sh->line_len) {
|
||||
sh->cursor = sh->line_len;
|
||||
}
|
||||
ush_input_selection_clear();
|
||||
}
|
||||
|
||||
ush_render_line(sh);
|
||||
@@ -168,11 +472,11 @@ static void ush_history_down(ush_state *sh) {
|
||||
}
|
||||
|
||||
static char ush_read_char_blocking(void) {
|
||||
for (;;) {
|
||||
u64 ch = cleonos_sys_kbd_get_char();
|
||||
char ch = '\0';
|
||||
|
||||
if (ch != (u64)-1) {
|
||||
return (char)(ch & 0xFFULL);
|
||||
for (;;) {
|
||||
if (cleonos_sys_fd_read(0ULL, &ch, 1ULL) == 1ULL) {
|
||||
return ch;
|
||||
}
|
||||
|
||||
__asm__ volatile("pause");
|
||||
@@ -207,17 +511,95 @@ void ush_read_line(ush_state *sh, char *out_line, u64 out_size) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ch == USH_KEY_SELECT_ALL) {
|
||||
ush_input_selection_select_all(sh);
|
||||
sh->cursor = sh->line_len;
|
||||
ush_render_line(sh);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch == USH_KEY_COPY) {
|
||||
ush_input_copy_selection(sh);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch == USH_KEY_PASTE) {
|
||||
if (ush_input_clipboard_len > 0ULL) {
|
||||
ush_history_cancel_nav(sh);
|
||||
(void)ush_input_delete_selection(sh);
|
||||
ush_input_insert_text(sh, ush_input_clipboard, ush_input_clipboard_len);
|
||||
ush_render_line(sh);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch == USH_KEY_SHIFT_LEFT) {
|
||||
if (ush_input_sel_anchor_valid == 0) {
|
||||
ush_input_sel_anchor = sh->cursor;
|
||||
ush_input_sel_anchor_valid = 1;
|
||||
}
|
||||
|
||||
if (sh->cursor > 0ULL) {
|
||||
sh->cursor--;
|
||||
}
|
||||
|
||||
ush_input_selection_update_from_anchor(sh);
|
||||
ush_render_line(sh);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch == USH_KEY_SHIFT_RIGHT) {
|
||||
if (ush_input_sel_anchor_valid == 0) {
|
||||
ush_input_sel_anchor = sh->cursor;
|
||||
ush_input_sel_anchor_valid = 1;
|
||||
}
|
||||
|
||||
if (sh->cursor < sh->line_len) {
|
||||
sh->cursor++;
|
||||
}
|
||||
|
||||
ush_input_selection_update_from_anchor(sh);
|
||||
ush_render_line(sh);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch == USH_KEY_SHIFT_HOME) {
|
||||
if (ush_input_sel_anchor_valid == 0) {
|
||||
ush_input_sel_anchor = sh->cursor;
|
||||
ush_input_sel_anchor_valid = 1;
|
||||
}
|
||||
|
||||
sh->cursor = 0ULL;
|
||||
ush_input_selection_update_from_anchor(sh);
|
||||
ush_render_line(sh);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch == USH_KEY_SHIFT_END) {
|
||||
if (ush_input_sel_anchor_valid == 0) {
|
||||
ush_input_sel_anchor = sh->cursor;
|
||||
ush_input_sel_anchor_valid = 1;
|
||||
}
|
||||
|
||||
sh->cursor = sh->line_len;
|
||||
ush_input_selection_update_from_anchor(sh);
|
||||
ush_render_line(sh);
|
||||
continue;
|
||||
}
|
||||
if (ch == USH_KEY_UP) {
|
||||
ush_input_selection_clear();
|
||||
ush_history_up(sh);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch == USH_KEY_DOWN) {
|
||||
ush_input_selection_clear();
|
||||
ush_history_down(sh);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch == USH_KEY_LEFT) {
|
||||
ush_input_selection_clear();
|
||||
if (sh->cursor > 0ULL) {
|
||||
sh->cursor--;
|
||||
ush_render_line(sh);
|
||||
@@ -226,6 +608,7 @@ void ush_read_line(ush_state *sh, char *out_line, u64 out_size) {
|
||||
}
|
||||
|
||||
if (ch == USH_KEY_RIGHT) {
|
||||
ush_input_selection_clear();
|
||||
if (sh->cursor < sh->line_len) {
|
||||
sh->cursor++;
|
||||
ush_render_line(sh);
|
||||
@@ -234,6 +617,7 @@ void ush_read_line(ush_state *sh, char *out_line, u64 out_size) {
|
||||
}
|
||||
|
||||
if (ch == USH_KEY_HOME) {
|
||||
ush_input_selection_clear();
|
||||
if (sh->cursor != 0ULL) {
|
||||
sh->cursor = 0ULL;
|
||||
ush_render_line(sh);
|
||||
@@ -242,6 +626,7 @@ void ush_read_line(ush_state *sh, char *out_line, u64 out_size) {
|
||||
}
|
||||
|
||||
if (ch == USH_KEY_END) {
|
||||
ush_input_selection_clear();
|
||||
if (sh->cursor != sh->line_len) {
|
||||
sh->cursor = sh->line_len;
|
||||
ush_render_line(sh);
|
||||
@@ -250,10 +635,17 @@ void ush_read_line(ush_state *sh, char *out_line, u64 out_size) {
|
||||
}
|
||||
|
||||
if (ch == '\b' || ch == 127) {
|
||||
if (ush_input_delete_selection(sh) != 0) {
|
||||
ush_history_cancel_nav(sh);
|
||||
ush_render_line(sh);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sh->cursor > 0ULL && sh->line_len > 0ULL) {
|
||||
u64 i;
|
||||
|
||||
ush_history_cancel_nav(sh);
|
||||
ush_input_selection_clear();
|
||||
|
||||
for (i = sh->cursor - 1ULL; i < sh->line_len; i++) {
|
||||
sh->line[i] = sh->line[i + 1ULL];
|
||||
@@ -267,10 +659,17 @@ void ush_read_line(ush_state *sh, char *out_line, u64 out_size) {
|
||||
}
|
||||
|
||||
if (ch == USH_KEY_DELETE) {
|
||||
if (ush_input_delete_selection(sh) != 0) {
|
||||
ush_history_cancel_nav(sh);
|
||||
ush_render_line(sh);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sh->cursor < sh->line_len) {
|
||||
u64 i;
|
||||
|
||||
ush_history_cancel_nav(sh);
|
||||
ush_input_selection_clear();
|
||||
|
||||
for (i = sh->cursor; i < sh->line_len; i++) {
|
||||
sh->line[i] = sh->line[i + 1ULL];
|
||||
@@ -290,32 +689,25 @@ void ush_read_line(ush_state *sh, char *out_line, u64 out_size) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sh->line_len + 1ULL >= USH_LINE_MAX) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ush_history_cancel_nav(sh);
|
||||
|
||||
if (sh->cursor == sh->line_len) {
|
||||
sh->line[sh->line_len++] = ch;
|
||||
sh->line[sh->line_len] = '\0';
|
||||
sh->cursor = sh->line_len;
|
||||
ush_write_char(ch);
|
||||
sh->rendered_len = sh->line_len;
|
||||
continue;
|
||||
}
|
||||
|
||||
{
|
||||
u64 i;
|
||||
int replaced_selection = ush_input_delete_selection(sh);
|
||||
|
||||
for (i = sh->line_len; i > sh->cursor; i--) {
|
||||
sh->line[i] = sh->line[i - 1ULL];
|
||||
if (sh->line_len + 1ULL >= USH_LINE_MAX) {
|
||||
continue;
|
||||
}
|
||||
|
||||
sh->line[sh->cursor] = ch;
|
||||
sh->line_len++;
|
||||
sh->cursor++;
|
||||
sh->line[sh->line_len] = '\0';
|
||||
if (replaced_selection == 0 && sh->cursor == sh->line_len) {
|
||||
sh->line[sh->line_len++] = ch;
|
||||
sh->line[sh->line_len] = '\0';
|
||||
sh->cursor = sh->line_len;
|
||||
ush_write_char(ch);
|
||||
sh->rendered_len = sh->line_len;
|
||||
continue;
|
||||
}
|
||||
|
||||
ush_input_insert_text(sh, &ch, 1ULL);
|
||||
ush_render_line(sh);
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user