home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l408 / 2.img / EXAMPLES.EXE / EXAMPLES / INCLUTIL / STATFORM.FRM (.txt) < prev   
Encoding:
Visual Basic Form  |  1992-10-12  |  10.7 KB  |  211 lines

  1. StatusForm
  2. !MicroHelp $Include Utility Status
  3. System
  4. Form1
  5. Label1
  6.     Directory
  7. FileOpenCurDir
  8. Curdir
  9. Label1
  10. Reading
  11. FileNameText
  12. Label1
  13. Processing
  14.     PFileName
  15.     KickStart
  16. Hidden
  17. System
  18. Command1
  19. Cancel
  20. System
  21. FileOpenDirList
  22. FileOpenList
  23. *.BAS
  24.     FileCount
  25.     Cancelled
  26. ProcessFilesr
  27. LineNumber!
  28. WhichLevel
  29. DirPointer
  30. DirLevel
  31. MainForm"
  32. IncFileSpecN
  33. Text$
  34. IncludeCompare
  35. ConvertToQ
  36. Enabled~
  37. False
  38. SavePath{
  39. FileOpenList
  40. DirOptions>
  41. Value
  42. DirectoryOption
  43. FileOpenDirList
  44. Pattern
  45. FormatPath
  46. StatusForm
  47. Tagged
  48.     ListCount
  49. FileOption)
  50.     ListIndex
  51. OldFileNameE
  52. FileNameText\
  53. Caption
  54.     PFileName
  55. TempFileName
  56. ReadNextLine
  57.     ReadError
  58. ProcessingDone~
  59. Codeline
  60. StripWhiteSpace
  61. IncludeFile
  62. IsIncludeFile0
  63. Pointer
  64. TestName\
  65. TestExt?
  66. Question
  67. WildCardCompare
  68. FileTextl
  69. ProcessOneFile
  70. BackupFileName2
  71. NoBackupFile
  72. RenameFilesL
  73. SkipRenames
  74. NextFile
  75. RetryDir
  76. Abort
  77. InFileNumber
  78. OutFileNumber
  79. IncludeFileName
  80. BaseFile
  81. FileNumber
  82. IncludeCount
  83. Addline
  84. MainOption
  85.     FileError
  86. IndentIncrement
  87. IndentSpacing
  88. Indent6
  89. Temp2
  90. SkippedFiles
  91. FileOpenSpec
  92. Command1_Click
  93. KickStart_Click
  94. TextElements
  95. FileOpenCurDir
  96. MhFalse4
  97. ProcessFiles
  98.  This SUB is responsible for processing the file selected in the
  99.  "Files to process" frame. In other words, it determines if it
  100.  should begin processing the BASIC program.i
  101.  If it determines that the BASIC file should be processed, then
  102.  control is transferred to the ProcessOneFile SUB, which can
  103.  then handle nested $INCLUDE files.e
  104.  Which level we're one
  105.  Index into FileOpenDirList arrayU
  106.  Get include file spec
  107.  Create wildcard spec to compare $INCLUDE file names
  108.  Convert *.* to 
  109. ?.????
  110.  Reset the count
  111.  Space to hold file so we don't have to read twice
  112.  Save for later restorationd
  113.  This dir or entire drivee
  114.  Change to root 
  115.  Set up the DirLevel array to keep track of where we are
  116.  Set local controlse
  117.  Redim as +1 so don't get "subcript out of range" if 0
  118.  Files matching spec
  119.  Mark all as Tagged
  120.  Selected file onlyc
  121.  Process each matching file in this dirc
  122. Get the file name
  123. Display file name
  124.  Used for trigger later 
  125.  Read the file, checking for the first $Include statement
  126.  that triggers processing.
  127.  Read a line
  128.  See if this line has a $INCLUDE statement
  129.  Strip raw file name. 
  130.  Done
  131.  Separate into filename and extensione
  132.  Fill out to 3
  133.  Fill out to 8
  134.  See if it matches our spec 
  135.  If not, don't process
  136.  If this is a valid include file
  137.  If we haven't opened the output file yett
  138.  Assume no extension
  139.  Period - found extension
  140. Forw slash, colon, backslash
  141.  No extension presenta
  142.  Write all buffered text before continuing
  143.  Free up string spaceg
  144.  Get the $INCLUDE line in the file
  145.  Complete the processing, including nested includes.
  146.  If function returns non-zero, an error occuredu
  147.  Finished with files
  148.  Force to ReadErrorz
  149.  If output file open
  150.  Since we haven't opened the output file, we
  151.  save this code for possible later writing.e
  152.  Free up string spacei
  153.  Rename original file as backup file
  154.  Rename temporary work file as original file
  155.  This dir only
  156.  Entire drive or this dir+belowi
  157.  Attempt to change to next subdiri
  158.  No more subdirs in this directory
  159.  We are finished
  160.  Back to 0 at this level
  161.  Change to parent 
  162.  Change to parent dirv
  163.  Change to that dir 
  164.  Back one leveli
  165.  Continue where we left offi
  166.  Get name of directory
  167.  Keep track of which dir at this level in next iteration
  168.  Change to that dirs
  169. FileOpenList.Refresh
  170.  Dropping through to LOOP statement, thus 
  171.  going through the loop againt
  172.  No backup file presenti
  173.  Illegal function call due to ASC(Null$)
  174. This file contains a line that is too long for Visual Basic to handle.
  175. Error"
  176.  has occurred.
  177. Continue with next file?
  178. File Read Error"
  179. ProcessOneFile
  180.  Enter with input file and output file open and pass
  181.  file numbers in first two parameters.
  182.  $INCLUDE file should not be open upon entry - just pass the
  183.  name in the parameter list.
  184.  Function returns Error number if an error occurred or MhFalse if not.
  185.  This SUB process nested $INCLUDE files.
  186.  Add lines or note
  187.  First free number
  188.  How we open the filer
  189.  Only worry about indenting if adding lines 
  190.  Beginning of file markere
  191.  Read a line
  192.  If found marker
  193.  Read input file until BOF/EOF marks are exhausted
  194.  If this line has a $INCLUDE statement
  195.  Beginning of file markerd
  196.  finished
  197.  End of file markerm
  198.  For all files openedE
  199.  No error occurred
  200. Abort
  201.  file"
  202.  processed successfully"
  203.  did not require updating.
  204. Process Complete
  205.  Clear selection
  206. Command1_Click
  207. Do you want to cancel this operation?"
  208. Cancel Operations"
  209. KickStart_Click
  210.  Clear text"
  211.