home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a070 / 3.ddi / FOXPRO / SAMPLE / SYSINFO.PRG < prev    next >
Encoding:
Text File  |  1990-04-07  |  2.4 KB  |  56 lines

  1. * ┌─────────────────────────────────────────────────────────────────────┐ *
  2. * │  PROG NAME: SYSINFO.PRG  Information on CONFIG.SYS file.            │ *
  3. * │  Copyright (c) 1989 Tech III, Inc. All rights reserved.             │ *
  4. * │  Tech III of San Pedro, California      (213) 547-2191.             │ *
  5. * │  "The bridge connecting people and technology."(tm)                 │ *
  6. * └─────────────────────────────────────────────────────────────────────┘ *
  7. * do MSG2USER with 'Checking FILES & BUFFER settings in your CONFIG.SYS file...'
  8. do while .not. file(MDRIVE + '\CONFIG.SYS')
  9.   store ' ' to MDRIVE
  10.   activate window MSG2USER
  11.   @ 00,01 say "Can't find your system CONFIG.SYS file."
  12.   @ 00,02 say "Enter drive letter or [ESCAPE]  return to main menu."
  13.   @ 00,03 say "Location of CONFIG.SYS is drive: " get MDRIVE picture '!'
  14.   read
  15.   if MDRIVE = space(1)
  16.     do MSG2USER with 'CLOSE'
  17.     return
  18.   endif
  19.   store MDRIVE + ':' to MDRIVE
  20. enddo
  21. do MSG2USER with 'CLOSE'
  22. CONFIG = fopen(MDRIVE + '\CONFIG.SYS')
  23. store 0 to FILESET, BUFFERSET
  24. store .T. to WORKING
  25. do while WORKING .and. ferror() = 0
  26.   INPUTLINE = fgets(CONFIG)
  27.   do case
  28.     case 'FILES' $ upper(INPUTLINE)
  29.       store val(ltrim(substr(INPUTLINE,at('=',INPUTLINE)+1))) to FILESET
  30.     case 'BUFFERS' $ upper(INPUTLINE)
  31.       store val(ltrim(substr(INPUTLINE,at('=',INPUTLINE)+1))) to BUFFERSET
  32.   endcase
  33.   if FILESET # 0 .and. BUFFERSET # 0
  34.     store .F. to WORKING
  35.   endif
  36. enddo
  37. = fclose(CONFIG)
  38. do MSG2USER with 'CLOSE'
  39. activate window WORKING
  40. @ 00,15 say 'SYSTEM CONFIGURATION INFORMATION'
  41. @ 02,01 say 'CONFIG.SYS FILES    = ' + ltrim(str(FILESET,4))
  42. @ 03,01 say 'CONFIG.SYS BUFFERS  = ' + ltrim(str(BUFFERSET,4))
  43. @ 04,01 say 'GRAPHICS HARDWARE   = ' + sys(2006)
  44. @ 05,01 say 'FOXPRO VERSION      = ' + left(version(1),at('SERIAL',UPPER(VERSION(1)))-1)
  45. @ 06,01 SAY 'SERIAL NUMBER       = ' + SUBSTR(VERSION(1),at('SERIAL',UPPER(VERSION(1))))
  46. @ 07,01 say 'DIRECTORY IN USE    = ' + curdir()
  47. @ 08,01 say 'FOXABLE BASE MEMORY = ' + ltrim(sys(12))
  48. @ 09,01 say 'FOXABLE MEM W/EMS   = ' + ltrim(sys(1001))
  49. @ 10,01 say 'DISK SPACE AVAIL.   = ' + ltrim(transform(diskspace(),'999,999,999'))
  50. @ 11,01 say 'SCREEN DIMENSIONS   = ' + str(srows(),2) + ' BY ' + ltrim(str(scols(),3))
  51. @ 12,01 say '* "Foxable" means available to FoxPro.'
  52. do STANDBY with 'Press any key to return to menu.'
  53. deactivate window WORKING
  54. * EOF
  55.  
  56.