C===============================================================================
C  Author: Kurt A. Spaugh, Softlynks Inc.
C    Date: 1/31/2003
C Purpose: Provide GNU g77 compatible methods for
C          MS Fortran Intrinsics: systemqq, getdat, and gettim
C
C          Add the following line to the end of any of Erik Bakers
C          MS Fortran sources to make them buildable with g77:
C
C       INCLUDE 'vpmg77.f'
C
C          Recommended g77 command for 'vpm.f':
C
C          g77 -Wall -Wimplicit -pedantic -fno-f2c -o vpm.exe vpm.f
C===============================================================================
C stub for microsoft systemqq call under GNU Fortran (g77)
C does nothing - the program only uses it to clear the screen
C On input, the cmd argument contains 'CLS'. If you want the
C screen cleared, change the command as appropriate for your
C shell, and uncomment the 'call system' line(s).
C As implemented, g77 system call won't honor a 'cls'
C in DOS, anyway. I prefer the screen not clear. YMMV.
C===============================================================================
      subroutine systemqq(cmd)
      character cmd*20
C      integer status
C      cmd='clear'
C      call system(cmd,status)
      end subroutine
C===============================================================================
C stub for microsoft getdat call under GNU Fortran (g77)
C On completion, year, month and day are filled with today's date
C===============================================================================
      subroutine getdat(year,month,day)
      integer*2 year,month,day
      integer STime
      integer tArray(9)
      STime=Time()
      call LTime(STime,tArray)
      year=tArray(6)+1900
      month=tArray(5)+1
      day =tArray(4)
      end subroutine
C===============================================================================
C stub for microsoft gettim call under GNU Fortran (g77)
C On completion, hour,minute,second contain 24 hour local time.
C hundredths is set to 0.
C===============================================================================
      subroutine gettim(hour,minute,second,hundredth)
      integer*2 hour,minute,second,hundredth
      integer STime
      integer tArray(9)
      STime=Time()
      call LTime(STime,tArray)
      hour=tArray(3)
      minute=tArray(2)
      second=tArray(1)
      hundredth=0
      end subroutine
