Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,2 @@
print StartupDir$
print DefaultDir$

View file

@ -0,0 +1,29 @@
print GetEnvironmentVariable$("USERNAME")
print GetEnvironmentVariable$("USERPROFILE") ' equivalent to UNIX HOME variable
print GetEnvironmentVariable$("PATH")
end
function GetEnvironmentVariable$(lpName$)
'get the value of an environment variable
nSize = 1024
[Retry]
lpBuffer$ = space$(nSize)
calldll #kernel32, "GetEnvironmentVariableA", _
lpName$ as ptr, _
lpBuffer$ as ptr, _
nSize as ulong, _
result as ulong
select case
' buffer too small
case result > nSize
nSize = result
goto [Retry]
' variable found
case result > 0
GetEnvironmentVariable$ = left$(lpBuffer$, result)
end select
end function