home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
MODEM
/
HOST1.ZIP
/
HOSTUTIL.SCR
< prev
next >
Wrap
Text File
|
1993-12-06
|
2KB
|
69 lines
' Utility routines for host mode.
const SecondsInDay = 86400
type DateTimeRec
D as long
T as long
end type
declare function DMYtoDate lib "winsys" (day as integer, month as integer, year as integer) as long
declare function Today lib "winsys" as long
declare sub wsDateToDateString lib "winsys" alias "DateToDateString" (dest as string, picture as string, julian as long, pack as integer)
declare function HMStoTime lib "winsys" (hour as integer, min as integer, sec as integer) as long
declare sub wsTimeToTimeString lib "winsys" alias "TimeToTimeString" (dest as string, picture as string, t as long, pack as integer)
declare function CurrentTime lib "winsys" as long
declare sub IncDateTime lib "winsys" (dt1 as DateTimeRec, dt2 as DateTimeRec, days as integer, seconds as long)
declare sub wsJustPathName lib "winsys" alias "JustPathName" (dest as string, pathname as string)
declare sub wsJustFilename lib "winsys" alias "JustFilename" (dest as string, pathname as string)
declare sub wsAddBackSlash lib "winsys" alias "AddBackSlash" (dest as string, dirname as string)
declare sub OemToAnsi lib "keyboard" (src as string, dest as string)
declare sub AnsiToOem lib "keyboard" (src as string, dest as string)
declare function AnsiUpper lib "user" (s as string) as string
function DateToDateString(picture as string, julian as long) as string
dim buf as string
buf = space(128)
call wsDateToDateString(buf, picture, julian, false)
DateToDateString = buf
end function
function TimeToTimeString(picture as string, t as long) as string
dim buf as string
buf = space(128)
call wsTimeToTimeString(buf, picture, t, false)
TimeToTimeString = buf
end function
function JustPathName(pathname as string) as string
dim buf as string
buf = space(128)
call wsJustPathName(buf, pathname)
JustPathName = buf
end function
function JustFilename(pathname as string) as string
dim buf as string
buf = space(128)
call wsJustFilename(buf, pathname)
JustFilename = buf
end function
function AddBackSlash(dirname as string) as string
dim buf as string
buf = space(128)
call wsAddBackSlash(buf, dirname)
AddBackSlash = buf
end function
function OemUpper(s as string) as string
dim buf as string
buf = space(len(s))
call OemToAnsi(s, buf)
call AnsiUpper(buf)
call AnsiToOem(buf, buf)
OemUpper = buf
end function