From bea1c35caf6d2505f8222d28e1ad33429f4413ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20GIBERT?= Date: Mon, 13 Mar 2017 16:33:47 +0100 Subject: [PATCH] Kernel version 0.9 : LIBBLKDEV Doc --- _Docs/LIBBLKDEV.md | 3 +- _Tools/docgen.cmd | 127 +++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 75 deletions(-) diff --git a/_Docs/LIBBLKDEV.md b/_Docs/LIBBLKDEV.md index a722ca0e..ec4c91c6 100644 --- a/_Docs/LIBBLKDEV.md +++ b/_Docs/LIBBLKDEV.md @@ -9,7 +9,8 @@ ##Out : + X=BlockCount (max 22) + A=PageCount (max 44) -BuildProDOSCat + +#BuildProDOSCat ##In : + PUSHW = DevSize (in 512b blocks) diff --git a/_Tools/docgen.cmd b/_Tools/docgen.cmd index 5248f429..655f8190 100644 --- a/_Tools/docgen.cmd +++ b/_Tools/docgen.cmd @@ -14,88 +14,67 @@ echo Apple //e set /a c=0 set DOCFILE=%~dp0..\_Docs\KERNEL.md +set SRCDIR=%~dp0..\SYS +set FILTER=KERNEL.S*.txt -echo # A2osX Kernel API >!DOCFILE! -echo *** Auto generated by docgen.cmd *** >!DOCFILE! +Call :SCAN -echo. -echo Scanning KERNEL Src Files... -echo. - -for /f %%F in ('dir /b /ogn "%~dp0..\SYS\KERNEL.S*.txt"') do ( - set FN=%%F - set /a c+=1 - set /p "=!c! - !FN! !CR!" >!DOCFILE! - (echo !LINE!)>>!DOCFILE! - ) - ) - ) - ) - ) - set DOCFILE=%~dp0..\_Docs\LIBTCPIP.md +set SRCDIR=%~dp0..\LIB +set FILTER=LIBTCPIP.S*.txt -echo # A2osX LIBTCPIP API >!DOCFILE! -echo *** Auto generated by docgen.cmd *** >!DOCFILE! +Call :SCAN -echo. -echo Scanning LIBTCPIP Src Files... -echo. +set DOCFILE=%~dp0..\_Docs\LIBBLKDEV.md +set SRCDIR=%~dp0..\LIB +set FILTER=LIBBLKDEV.S*.txt + +Call :SCAN + +set FILTER=LIBTCPIP.S*.txt -for /f %%F in ('dir /b /ogn "%~dp0..\LIB\LIBTCPIP.S*.txt"') do ( - set FN=%%F - set /a c+=1 - set /p "=!c! - !FN! !CR!" >!DOCFILE! - (echo !LINE!)>>!DOCFILE! - ) - ) - ) - ) - ) - - -echo. echo. echo All done : !c! Files scanned. echo. echo (I know, this batch is stupid ;-) echo. -pause \ No newline at end of file +pause +exit 0 + + +:SCAN +echo *** Auto generated by docgen.cmd *** >!DOCFILE! + +echo. +echo Scanning %FILTER% Files... +echo. + +for /f %%F in ('dir /b /ogn "%SRCDIR%\%FILTER%"') do ( + set FN=%%F + set /a c+=1 + set /p "=!c! - !FN! !CR!" >!DOCFILE! + (echo !LINE!)>>!DOCFILE! + ) + ) + ) + ) + )