home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / MODEM / HOST1.ZIP / HOSTUTIL.SCR < prev    next >
Text File  |  1993-12-06  |  2KB  |  69 lines

  1. ' Utility routines for host mode.
  2.  
  3. const SecondsInDay = 86400
  4.  
  5. type DateTimeRec
  6.   D as long
  7.   T as long
  8. end type
  9.  
  10. declare function DMYtoDate lib "winsys" (day as integer, month as integer, year as integer) as long
  11. declare function Today lib "winsys" as long
  12. declare sub wsDateToDateString lib "winsys" alias "DateToDateString" (dest as string, picture as string, julian as long, pack as integer)
  13. declare function HMStoTime lib "winsys" (hour as integer, min as integer, sec as integer) as long
  14. declare sub wsTimeToTimeString lib "winsys" alias "TimeToTimeString" (dest as string, picture as string, t as long, pack as integer)
  15. declare function CurrentTime lib "winsys" as long
  16. declare sub IncDateTime lib "winsys" (dt1 as DateTimeRec, dt2 as DateTimeRec, days as integer, seconds as long)
  17.  
  18. declare sub wsJustPathName lib "winsys" alias "JustPathName" (dest as string, pathname as string)
  19. declare sub wsJustFilename lib "winsys" alias "JustFilename" (dest as string, pathname as string)
  20. declare sub wsAddBackSlash lib "winsys" alias "AddBackSlash" (dest as string, dirname as string)
  21.  
  22. declare sub OemToAnsi lib "keyboard" (src as string, dest as string)
  23. declare sub AnsiToOem lib "keyboard" (src as string, dest as string)
  24. declare function AnsiUpper lib "user" (s as string) as string
  25.  
  26. function DateToDateString(picture as string, julian as long) as string
  27.   dim buf as string
  28.   buf = space(128)
  29.   call wsDateToDateString(buf, picture, julian, false)
  30.   DateToDateString = buf
  31. end function
  32.  
  33. function TimeToTimeString(picture as string, t as long) as string
  34.   dim buf as string
  35.   buf = space(128)
  36.   call wsTimeToTimeString(buf, picture, t, false)
  37.   TimeToTimeString = buf
  38. end function
  39.  
  40. function JustPathName(pathname as string) as string
  41.   dim buf as string
  42.   buf = space(128)
  43.   call wsJustPathName(buf, pathname)
  44.   JustPathName = buf
  45. end function
  46.  
  47. function JustFilename(pathname as string) as string
  48.   dim buf as string
  49.   buf = space(128)
  50.   call wsJustFilename(buf, pathname)
  51.   JustFilename = buf
  52. end function
  53.  
  54. function AddBackSlash(dirname as string) as string
  55.   dim buf as string
  56.   buf = space(128)
  57.   call wsAddBackSlash(buf, dirname)
  58.   AddBackSlash = buf
  59. end function
  60.  
  61. function OemUpper(s as string) as string
  62.   dim buf as string
  63.   buf = space(len(s))
  64.   call OemToAnsi(s, buf)
  65.   call AnsiUpper(buf)
  66.   call AnsiToOem(buf, buf)
  67.   OemUpper = buf
  68. end function
  69.