Kernel version 0.8 : Docs...

This commit is contained in:
Rémy GIBERT 2016-10-22 10:33:22 +02:00
parent 87fc3517ea
commit 86d7497768
2 changed files with 57 additions and 4 deletions

View File

@ -1,8 +1,17 @@
# A2osX Kernel API
*** Auto generated by docgen.cmd ***
#K.PStrUprYA
Convert string to UPPERCASE
#K.PStrLwrYA
Convert string to lowercase
##In:
Y,A = PTR to String (PSTRING)
##Out:
Uppercased/lowercased String in Buffer
#K.PStrFTime
Convert S.TIME struct to PSTR
##In :
PULLW = Src PTR To S.Time
PULLW = Src PTR To Format String
PUSHW = Dst PTR To PSTR Buf
PUSHW = Src PTR To Format String
%a Abbreviated weekday name : Thu
%A Full weekday name : Thursday
%b Abbreviated month name : Aug
@ -17,6 +26,15 @@
%w Weekday as a decimal number with Sunday as 0 (0-6)
%y Year, last two digits (00-99)
%Y Year four digits 2001
PULLW = Dst PTR To PSTR Buf
PUSHW = Src PTR To S.Time
##Out :
none. always succeed.
#K.PStr2StrArrayYA
##In :
Y,A = PTR to String
##Out :
CC : success
Y,A = PTR to StrArray
X = hMem
CS : error
A = SYS error code

35
_Tools/docgen.cmd Normal file
View File

@ -0,0 +1,35 @@
@echo off
title Kernel DOC generator
COLOR 2A
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
set DOCFILE=%~dp0..\_Docs\KERNEL.md
echo # A2osX Kernel API >!DOCFILE!
echo *** Auto generated by docgen.cmd *** >!DOCFILE!
for /f %%F in ('dir /b /ogn %~dp0..\SYS\KERNEL.S*.txt') do (
set FN=%%F
echo Filename : !FN!
set bInDoc=0
for /F "tokens=*" %%L in (%~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 (
echo !LINE:~2! >>!DOCFILE!
)
)
)
)
)