Kernel version 0.9 : LIBBLKDEV Doc

This commit is contained in:
Rémy GIBERT 2017-03-13 16:33:47 +01:00
parent 07dba33f26
commit bea1c35caf
2 changed files with 55 additions and 75 deletions

View File

@ -9,7 +9,8 @@
##Out : ##Out :
+ X=BlockCount (max 22) + X=BlockCount (max 22)
+ A=PageCount (max 44) + A=PageCount (max 44)
BuildProDOSCat
#BuildProDOSCat
##In : ##In :
+ PUSHW = DevSize (in 512b blocks) + PUSHW = DevSize (in 512b blocks)

View File

@ -14,88 +14,67 @@ echo Apple //e
set /a c=0 set /a c=0
set DOCFILE=%~dp0..\_Docs\KERNEL.md set DOCFILE=%~dp0..\_Docs\KERNEL.md
set SRCDIR=%~dp0..\SYS
set FILTER=KERNEL.S*.txt
echo # A2osX Kernel API >!DOCFILE! Call :SCAN
echo *** Auto generated by docgen.cmd *** >!DOCFILE!
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!" <NUL
set bInDoc=0
for /F "tokens=*" %%L in ('type "%~dp0..\SYS\!FN!"') do (
set LINE=%%L
if defined LINE (
set bOut=1
if "!LINE:~0,2!" EQU "*/" (
set bInDoc=1
set bOut=0
)
if "!LINE:~0,2!" EQU "*\" (
set bInDoc=0
set bOut=0
)
if !bInDoc! EQU 1 (
if !bOut! EQU 1 (
if "!line:~0,4!" EQU "* " set LINE= + !LINE:~4!
if "!line:~0,3!" EQU "* " set LINE=+ !LINE:~3!
if "!line:~0,2!" EQU "* " set LINE=!LINE:~2!
if "!line:~0,1!" EQU "#" echo.>>!DOCFILE!
(echo !LINE!)>>!DOCFILE!
)
)
)
)
)
set DOCFILE=%~dp0..\_Docs\LIBTCPIP.md set DOCFILE=%~dp0..\_Docs\LIBTCPIP.md
set SRCDIR=%~dp0..\LIB
set FILTER=LIBTCPIP.S*.txt
echo # A2osX LIBTCPIP API >!DOCFILE! Call :SCAN
echo *** Auto generated by docgen.cmd *** >!DOCFILE!
echo. set DOCFILE=%~dp0..\_Docs\LIBBLKDEV.md
echo Scanning LIBTCPIP Src Files... set SRCDIR=%~dp0..\LIB
echo. 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!" <NUL
set bInDoc=0
for /F "tokens=*" %%L in ('type "%~dp0..\LIB\!FN!"') do (
set LINE=%%L
if defined LINE (
set bOut=1
if "!LINE:~0,2!" EQU "*/" (
set bInDoc=1
set bOut=0
)
if "!LINE:~0,2!" EQU "*\" (
set bInDoc=0
set bOut=0
)
if !bInDoc! EQU 1 (
if !bOut! EQU 1 (
if "!line:~0,4!" EQU "* " set LINE= + !LINE:~4!
if "!line:~0,3!" EQU "* " set LINE=+ !LINE:~3!
if "!line:~0,2!" EQU "* " set LINE=!LINE:~2!
if "!line:~0,1!" EQU "#" echo.>>!DOCFILE!
(echo !LINE!)>>!DOCFILE!
)
)
)
)
)
echo.
echo. echo.
echo All done : !c! Files scanned. echo All done : !c! Files scanned.
echo. echo.
echo (I know, this batch is stupid ;-) echo (I know, this batch is stupid ;-)
echo. echo.
pause 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!" <NUL
set bInDoc=0
for /F "tokens=*" %%L in ('type "%SRCDIR%\!FN!"') do (
set LINE=%%L
if defined LINE (
set bOut=1
if "!LINE:~0,2!" EQU "*/" (
set bInDoc=1
set bOut=0
)
if "!LINE:~0,2!" EQU "*\" (
set bInDoc=0
set bOut=0
)
if !bInDoc! EQU 1 (
if !bOut! EQU 1 (
if "!line:~0,4!" EQU "* " set LINE= + !LINE:~4!
if "!line:~0,3!" EQU "* " set LINE=+ !LINE:~3!
if "!line:~0,2!" EQU "* " set LINE=!LINE:~2!
if "!line:~0,1!" EQU "#" echo.>>!DOCFILE!
(echo !LINE!)>>!DOCFILE!
)
)
)
)
)