home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / smart21b.zip / DAPIEMRG.CMD < prev    next >
OS/2 REXX Batch file  |  1995-09-11  |  20KB  |  577 lines

  1. /* Rexx command to merge reports resulting from analysis using tables:   */
  2. /* W16DAPIE and DAPIE16.                                                 */
  3. /* L.D. 8-7-95                                                           */
  4. /* New Feature to add headings to the original reports and re-write them */
  5. /* L.D. 8-8-95                                                           */
  6.  
  7. /* Load RexxUtils */
  8. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  9. call SysLoadFuncs
  10.  
  11. Parse Arg help .
  12. if help = "?" then call DisplayHelp
  13.  
  14. /* Initialize running totals for effort calculations */
  15. Subtotal = 0
  16. Total    = 0
  17.  
  18. /* Ask all the annoying questions for report headings */
  19. Call GetInitData
  20.  
  21. outfile  = pname".dap" /* W16DAPIE and DAPIE16 merged .rpt */
  22.  
  23. /* delete existing .dap if there is one */
  24. if (stream(pname".dap",'c','query exists') \= "") then do
  25.    say pname".dap file exists, Continue? y/n?"
  26.    say "Note:  If you do continue, the existing" pname".dap file will be deleted."
  27.    Parse UPPER pull answer .
  28.    if answer = "N" then exit
  29.      call SysFileDelete pname".dap"
  30. end /* if */
  31.  
  32. say "Saving original files with the .rpt extensions:"  infile1 "and" infile2
  33. say "Generating additional reports with headers:"  tmpfile1 "and" tmpfile2
  34.  
  35. /* open the outputfiles */
  36. lineoutResult = LINEOUT(outfile,,)
  37. lineoutResult = LINEOUT(tmpfile1,,) /* FileName entered in GetInitData */
  38. lineoutResult = LINEOUT(tmpfile2,,) /* FileName entered in GetInitData */
  39.  
  40. /* Write esc sequence to print landscape */
  41. lineoutResult = LINEOUT(outfile,'1b6c'x)
  42. lineoutResult = LINEOUT(tmpfile1,'1b6c'x)
  43. lineoutResult = LINEOUT(tmpfile2,'1b6c'x)
  44.  
  45. /* Call function to write Page Headers for all 3 reports */
  46. PageNum = 1
  47. Call PageHead dateDap timeDap outfile PageNum nameDap
  48. Call WriteSum outfile
  49.  
  50. Call PageHead date1 time1 tmpfile1 PageNum name1
  51. Call WriteSum tmpfile1
  52.  
  53. Call PageHead date2 time2 tmpfile2 PageNum name2
  54. Call WriteSum tmpfile2
  55.  
  56. PageNum = 2
  57. Call PageHead dateDap timeDap outfile PageNum nameDap
  58. Call PageHead date1 time1 tmpfile1 PageNum name1
  59. Call PageHead date2 time2 tmpfile2 PageNum name2
  60. LineNum = 2
  61.  
  62. /* open the input files*/
  63. noread = LINEIN(infile1,,0)
  64. noread = LINEIN(infile2,,0)
  65.  
  66. Say "Processing file:" tmpfile2
  67.  
  68. noread = LINEIN(infile2,,0)
  69. /* read the entire DAPIE16 .rpt into an array */
  70.  
  71. PageNum2 = PageNum
  72. LineNum2 = LineNum
  73.  
  74. subby = 0
  75. do while (LINES(infile2))
  76.  
  77.    if LineNum2 > 45 then do
  78.       lineoutResult = LINEOUT(tmpfile2,'0C'x)
  79.       PageNum2 = PageNum2 + 1
  80.       Call PageHead date2 time2 tmpfile2 PageNum2 name2
  81.       LineNum2 = 2
  82.    end /* if */
  83.  
  84.    subby =  subby+1
  85.    inline.subby = LINEIN(infile2)
  86.  
  87.    /* Write the line to the report */
  88.    lineoutResult = LINEOUT(tmpfile2,inline.subby)
  89.    if lineoutResult = 1 then say "error outputting line" inline.subby "to file" infile2
  90.    if inline.subby = '0C'x then do
  91.       totalLines = subby
  92.       if LineNum2 > 3 then do
  93.          PageNum2 = PageNum2 + 1
  94.          Call PageHead date2 time2 tmpfile2 PageNum2 name2
  95.          LineNum2 = 2
  96.       end
  97.    end /* if */
  98.  
  99.    else LineNum2 = LineNum2 + 1
  100. end /* while */
  101.  
  102. Say "Processing file:" tmpfile1
  103.  
  104. /* Write headers */
  105. Call WriteHeaders
  106.  
  107. PageNum1 = PageNum
  108. LineNum1 = LineNum
  109. ModuleEnd = 0
  110.  
  111. subby=1
  112. /* parse each line of the WIN16T .rpt */
  113. do while (LINES(infile1))
  114.    inline1 = LINEIN(infile1)
  115.  
  116.    if LineNum1 > 45 then do
  117.       lineoutResult = LINEOUT(tmpfile1,'0C'x)
  118.       PageNum1 = PageNum1 + 1
  119.       Call PageHead date1 time1 tmpfile1 PageNum1 name1
  120.       LineNum1 = 2
  121.    end /* if */
  122.  
  123.    /* Write the line to the report */
  124.    lineoutResult = LINEOUT(tmpfile1,inline1)
  125.    if lineoutResult = 1 then say "error outputting line" inline1 "to file" tmpfile1
  126.  
  127.    PARSE VAR inline1 searchKey size1 lines1 code1 hits1 pcthits1 inst1 pctinst1 effort1 .
  128.  
  129.    /* if we've reached the break character, then we are done with the DAP rpt */
  130.    if searchKey = '0c'x then do
  131.       ModuleEnd = 1
  132.       totalLines = subby
  133.       if LineNum1 > 3 then do
  134.          PageNum1 = PageNum1 + 1
  135.          Call PageHead date1 time1 tmpfile1 PageNum1 name1
  136.          LineNum1 = 2
  137.       end
  138.    end /* if */
  139.  
  140.    else do
  141.       LineNum1 = LineNum1 + 1
  142.       if ModuleEnd = 0 then do
  143.          /* skip the headings */
  144.          if (searchKey \= " ") & (searchKey \= "PATH/FILENAME") & ,
  145.             (searchKey \= "____________________") then do
  146.  
  147.             line2 = inline.subby
  148.             PARSE VAR line2 searchKey2 size2 lines2 code2 hits2 pcthits2 inst2 pctinst2 effort2 .
  149.  
  150.             /* if this is a matching line, write the merged line */
  151.             if (searchKey = searchKey2) then do
  152.                if LineNum > 45 then do
  153.                   lineoutResult = LINEOUT(outfile,'0C'x)
  154.                   PageNum = PageNum + 1
  155.                   Call PageHead dateDap timeDap outfile PageNum nameDap
  156.                   LineNum = 2
  157.                end /* if */
  158.                if (searchKey = "*SubTotal*") then call GenSubs
  159.                else if (searchKey = "**Total**") then call GenTots
  160.                else call GenLine
  161.             end /* if */
  162.          end /* long if */
  163.       end /* if ModuleEnd...*/
  164.    end /* else */
  165.    subby = subby + 1
  166. end /* while */
  167.  
  168. /* Cleanup and exit */
  169. Call CleanupAndGo
  170.  
  171. /*-------------------------------------------------------------------------*/
  172. /*Sub routines follow                                                      */
  173. /*-------------------------------------------------------------------------*/
  174.  
  175. /* Ask analyst for info regarding the initial set of SMART reports and */
  176. /* other interesting input about the source code being analyzed        */
  177. GetInitData:
  178. say "Please enter a project name of 8 characters or less:"
  179. Parse UPPER PULL pname .
  180.  
  181. say "Please enter your name:"
  182. Parse PULL nameDap
  183.  
  184. dateDap = DATE('U')
  185. timeDap = TIME('N')
  186.  
  187. say "Please enter the file specification for the .rpt file resulting from"
  188. say "an analysis of the source for this project using the table W16DAPIE.TBL:"
  189. say "The path need not be specified if the file resides in the current directory. "
  190. parse PULL infile1
  191.  
  192. if (infile1="") then call BadFile
  193. else do
  194.    call SysFileTree infile1, 'file1', 'F'
  195.    if file1.0 = 0 then call BadFile
  196. end /* else */
  197.  
  198. say "Please enter the name of the person who ran the " infile1 "analysis:"
  199. say "If you ran the" infile1 "analysis, you may leave this blank and press enter."
  200. Parse PULL name1
  201.  
  202. if name1 = "" then name1 = nameDap
  203.  
  204. Parse Var file1.1 date1 time1 .
  205.  
  206. dot = POS(".",infile1)
  207. tmpfile1 = SUBSTR(infile1,1,dot) || "rpd"
  208.  
  209. say "Please enter the file specification for the .rpt file resulting from"
  210. say "an analysis of the source for this project using the table DAPIE16.TBL:"
  211. say "The path need not be specified if the file resides in the current directory. "
  212. parse PULL infile2
  213.  
  214. if (infile2="") then call BadFile
  215. else do
  216.    call SysFileTree infile2, 'file2', 'F'
  217.    if file2.0 = 0 then call BadFile
  218. end /* else */
  219.  
  220. say "Please enter the name of the person who ran the " infile2 "report:"
  221. say "If you ran the" infile2 "analysis, you may leave this blank and press enter."
  222. Parse PULL name2
  223.  
  224. if name2 = "" then name2 = nameDap
  225.  
  226. Parse Var file2.1 date2 time2 .
  227.  
  228. dot = POS(".",infile2)
  229. tmpfile2 = SUBSTR(infile2,1,dot) || "rpd"
  230.  
  231. say "Were the two analyses," infile1 "and " infile2 "run with the same"
  232. say "List-of-files and with the same EXCLUDE and IFDEF options?"
  233. Parse PULL SameLst
  234.  
  235. say "Does this source code contain any 32 bit APIs?"
  236. Parse PULL all16
  237.  
  238. say "Please enter any additional information about this source code, such as"
  239. say "Libraries used, MFC, Borland Owl, etc., in 72 characters or less:"
  240. Parse PULL Additional
  241.  
  242. say "If a source file contains mixed DAPIE and non-DAPIE code, the effort value"
  243. say "may need to be increased for the first non-DAPIE hit to account for code re-"
  244. say "structuring.  Please enter additional effort value now or press enter to default to 0."
  245. Parse Pull firstHit
  246. if firstHit = "" then firstHit = 0
  247. if DATATYPE(firstHit,'N') = 0 then firstHit = 0
  248.  
  249. say "If a source file contains mixed DAPIE and non-DAPIE code, the effort value"
  250. say "for each subsequent non-DAPIE hit in this file will be increased by 2.  To"
  251. say "change this please enter a new value. Press enter to default to 2."
  252. Parse Pull subsHit
  253. if subsHit = "" then subsHit = 2
  254. if DATATYPE(subsHit,'N') = 0 then subsHit = 2
  255.  
  256. return
  257.  
  258. /*  Write the headers for the report */
  259. WriteHeaders:
  260.    headerLine = RIGHT("WIN16",58)
  261.    headerLine = headerLine RIGHT("DAPIE",8)
  262.    headerLine = headerLine RIGHT("WIN16",8)
  263.    headerLine = headerLine RIGHT("DAPIE",8)
  264.  
  265.    lineoutResult = LINEOUT(outfile,headerLine)
  266.    if lineoutResult = 1 then say "error outputting line" headerLine
  267.  
  268.    headerLine = LEFT("PATH/FILENAME",20)
  269.    headerLine = headerLine RIGHT("SIZE",10)
  270.    headerLine = headerLine RIGHT("LINES",8)
  271.    headerLine = headerLine RIGHT("CODE",8)
  272.    headerLine = headerLine RIGHT("HITS",8)
  273.    headerLine = headerLine RIGHT("HITS",8)
  274.    headerLine = headerLine RIGHT("INSTS",8)
  275.    headerLine = headerLine RIGHT("INSTS",8)
  276.    headerLine = headerLine RIGHT("EFFORT",8)
  277.  
  278.    lineoutResult = LINEOUT(outfile,headerLine)
  279.    if lineoutResult = 1 then say "error outputting line" headerLine
  280.  
  281.    headerLine = LEFT("_",20,"_")
  282.    headerLine = headerLine RIGHT("_",10,"_")
  283.    headerLine = headerLine RIGHT("_",8,"_")
  284.    headerLine = headerLine RIGHT("_",8,"_")
  285.    headerLine = headerLine RIGHT("_",8,"_")
  286.    headerLine = headerLine RIGHT("_",8,"_")
  287.    headerLine = headerLine RIGHT("_",8,"_")
  288.    headerLine = headerLine RIGHT("_",8,"_")
  289.    headerLine = headerLine RIGHT("_",8,"_")
  290.  
  291.    lineoutResult = LINEOUT(outfile,headerLine)
  292.    if lineoutResult = 1 then say "error outputting line" headerLine
  293.  
  294.    headerLine = " "
  295.  
  296.    lineoutResult = LINEOUT(outfile,headerLine)
  297.    if lineoutResult = 1 then say "error outputting line" headerLine
  298.  
  299.    LineNum = LineNum + 4
  300. return
  301.  
  302. /* Generate a Merged line for the report and write it. */
  303. GenLine:                                   
  304.    LineNum = LineNum +1
  305.    if (size1 = " ") then mergedLine = LEFT(searchKey,20)
  306.    else do
  307.       mergedLine = LEFT("  " searchKey,20)
  308.       mergedLine = mergedLine RIGHT(size1,10)
  309.       mergedLine = mergedLine RIGHT(lines1,8)
  310.       mergedLine = mergedLine RIGHT(code1,8)
  311.  
  312.       /* WIN16 hits =  WIN16 Hits - DAPIE hits */
  313.       Call StripCommas hits1
  314.       hits1 = stripped
  315.       Call StripCommas hits2
  316.       hits2 = stripped
  317.       if ( DATATYPE(hits1,'N') = 0 | DATATYPE(hits2,'N') = 0 ) then
  318.          hits1 = "BADDATA"
  319.       else
  320.          hits1 = hits1-hits2
  321.  
  322.       mergedLine = mergedLine RIGHT(hits1,8)
  323.       mergedLine = mergedLine RIGHT(hits2,8)
  324.  
  325.       /* WIN16 unique instances =  WIN16 unique instances - DAPIE unique instances */
  326.       Call StripCommas inst1
  327.       inst1 = stripped
  328.       Call StripCommas inst2
  329.       inst2 = stripped
  330.       if ( DATATYPE(inst1,'N') = 0 | DATATYPE(inst2,'N') = 0 ) then
  331.          inst1 = "BADDATA"
  332.       else
  333.          inst1 = inst1-inst2
  334.  
  335.       mergedLine = mergedLine RIGHT(inst1,8)
  336.       mergedLine = mergedLine RIGHT(inst2,8)
  337.       call CalcEffort
  338.       mergedLine = mergedLine RIGHT(effort,8)
  339.    end /* else do */
  340.  
  341.    /* Write the line to the report */
  342.    lineoutResult = LINEOUT(outfile,mergedLine)
  343.    if lineoutResult = 1 then say "error outputting line" mergedLine
  344.  return
  345.  
  346.  
  347. /* Generate the Merged Subtotal line for the report and write it.  */
  348. GenSubs:                                   
  349.    LineNum = LineNum +2
  350.    PARSE VAR inline1 searchKey count size1 lines1 code1 hits1 pcthits1 effort1 .
  351.    PARSE VAR line2  searchKey2 count size2 lines2 code2 hits2 pcthits2 effort2 .
  352.    mergedLine = LEFT(searchKey count,20)
  353.    mergedLine = mergedLine RIGHT(size1,10)
  354.    mergedLine = mergedLine RIGHT(lines1,8)
  355.    mergedLine = mergedLine RIGHT(code1,8)
  356.  
  357.    /* WIN16 hits =  WIN16 Hits - DAPIE hits */
  358.    Call StripCommas hits1
  359.    hits1 = stripped
  360.    Call StripCommas hits2
  361.    hits2 = stripped
  362.    if ( DATATYPE(hits1,'N') = 0 | DATATYPE(hits2,'N') = 0 ) then
  363.       hits1 = "BADDATA"
  364.    else
  365.       hits1 = hits1-hits2
  366.  
  367.    mergedLine = mergedLine RIGHT(hits1,8)
  368.    mergedLine = mergedLine RIGHT(hits2,8)
  369.    mergedLine = mergedLine RIGHT(" ",8)
  370.    mergedLine = mergedLine RIGHT(" ",8)
  371.    mergedLine = mergedLine RIGHT(Subtotal,8)
  372.  
  373.    /* Write the line to the report */
  374.    lineoutResult = LINEOUT(outfile,mergedLine)
  375.    if lineoutResult = 1 then say "error outputting line" mergedLine
  376.  
  377.    /* Write a blank line to the report */
  378.    mergedLine = " "
  379.    lineoutResult = LINEOUT(outfile,mergedLine)
  380.    if lineoutResult = 1 then say "error outputting line" mergedLine
  381.  
  382.    /* Reset subtotal */
  383.    Subtotal = 0
  384.  return
  385.  
  386. /* Generate the Merged Total line for the report and write it.  */
  387. GenTots:                                   
  388.    LineNum = LineNum +1
  389.    PARSE VAR inline1 searchKey count size1 lines1 code1 hits1 pcthits1 inst1 pctinst1 effort1 .
  390.    PARSE VAR line2  searchKey2 count size2 lines2 code2 hits2 pcthits2 inst2 pctinst2 effort2 .
  391.    mergedLine = LEFT(searchKey count,20)
  392.    mergedLine = mergedLine RIGHT(size1,10)
  393.    mergedLine = mergedLine RIGHT(lines1,8)
  394.    mergedLine = mergedLine RIGHT(code1,8)
  395.  
  396.    /* WIN16 hits =  WIN16 Hits - DAPIE hits */
  397.    Call StripCommas hits1
  398.    hits1 = stripped
  399.    Call StripCommas hits2
  400.    hits2 = stripped
  401.    if ( DATATYPE(hits1,'N') = 0 | DATATYPE(hits2,'N') = 0 ) then
  402.       hits1 = "BADDATA"
  403.    else
  404.       hits1 = hits1-hits2
  405.  
  406.    mergedLine = mergedLine RIGHT(hits1,8)
  407.    mergedLine = mergedLine RIGHT(hits2,8)
  408.  
  409.    /* WIN16 unique instances =  WIN16 unique instances - DAPIE unique instances */
  410.    Call StripCommas inst1
  411.    inst1 = stripped
  412.    Call StripCommas inst2
  413.    inst2 = stripped
  414.    if ( DATATYPE(inst1,'N') = 0 | DATATYPE(inst2,'N') = 0 ) then
  415.       inst1 = "BADDATA"
  416.    else
  417.       inst1 = inst1-inst2
  418.  
  419.    mergedLine = mergedLine RIGHT(inst1,8)
  420.    mergedLine = mergedLine RIGHT(inst2,8)
  421.    mergedLine = mergedLine RIGHT(Total,8)
  422.  
  423.    /* Write the line to the report */
  424.    lineoutResult = LINEOUT(outfile,mergedLine)
  425.    if lineoutResult = 1 then say "error outputting line" mergedLine
  426.  return
  427.  
  428. /* Display help for this command and exit */
  429. DisplayHelp:
  430.    say "The DAPIEMRG.CMD will generate a detailed SMART report showing"
  431.    say "side-by-side the keyword hits and unique instances for both DAPIE"
  432.    say "keywords and non-DAPIE keywords, by source file.  This can be used to"
  433.    say "determine where code restructuring will be needed to keep DAPIE and"
  434.    say "non-DAPIE keywords in separate source files with appropriate headers."
  435.    say " "
  436.    say "This CMD will ask for inputs as as follows:"
  437.    say " "
  438.    say "1) A project name of 8 characters or less"
  439.    say "2) Your name"
  440.    say "3) The file specification for the .rpt file resulting from an"
  441.    say "   analysis of the source for this project using the table W16DAPIE.TBL"
  442.    say "4) The name of the person who ran the report"
  443.    say "5) The file specification for the .rpt file resulting from an"
  444.    say "   analysis of the source for this project using the table DAPIE16.TBL"
  445.    say "6) The name of the person who ran that report"
  446.    say "7) Were the previous two analyses,run with the same"
  447.    say "   List-of-files and with the same EXCLUDE and IFDEF options?"
  448.    say "8) Does this source code contain any 32 bit APIs?"
  449.    say "9) Please enter any additional information about this source code, such"
  450.    say "    as Libraries used, MFC, Borland Owl, etc., in 72 characters or less:"
  451.    pause
  452.    say "10) If a source file contains mixed DAPIE and non-DAPIE code, the effort value"
  453.    say "may need to be increased for the first non-DAPIE hit to account for code re-"
  454.    say "structuring.  Please enter additional effort value now or press enter to default to 0."
  455.    say "11) If a source file contains mixed DAP and non-DaP code, the effort value"
  456.    say "    for each subsequent non-DAPIE hit in this file will be increased by 2.  To"
  457.    say "    change this please enter a new value. Press enter to default to 2."
  458.    say " "
  459.    say "This input must be provided in the order requested.  The resulting"
  460.    say "report will be called Pname.dap, where Pname is the project name "
  461.    say "entered in Number 1 above, and will be placed "
  462.    say "in the current directory.  If the same List-of-files, EXCLUDE and"
  463.    say "IFDEFS were not used for both analyses, the results will be unpredicatble."
  464. exit
  465.  
  466. /* strips commas from the passed in arg --for numbers over 999, for example */
  467. StripCommas:
  468.    comma = POS(",",ARG(1))
  469.    if comma = 0 then stripped = ARG(1)
  470.  
  471.    else do
  472.       therest= LENGTH(ARG(1)) - comma
  473.       stripped = SUBSTR(ARG(1),1,comma-1) || SUBSTR(ARG(1),comma+1, therest)
  474.    end /* else */
  475.  
  476.    return
  477.  
  478. /* Write the heading for the specified file */
  479. PageHead:
  480.    Parse Arg ThisDate ThisTime ThisOutFile Num AnalystName
  481.  
  482.    PageHeadLine = "Project:  "pname "  Analyst:  "AnalystName "  Date:  "ThisDate ,
  483.       " Time:  "ThisTime " FILE:" ThisOutFile "  Page: " Num
  484.  
  485.    lineoutResult = LINEOUT(ThisOutFile,PageHeadLine)
  486.    lineoutResult = LINEOUT(ThisOutFile," ")
  487. return
  488.  
  489. /* Write the Summary Info Page for the specified file */
  490. WriteSum:
  491.    Parse Arg ThisOutFile .
  492.    SumLine="Project Name:           " pname
  493.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  494.  
  495.    SumLine="Analyst Name:           " nameDap
  496.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  497.  
  498.    SumLine="Date:                   " dateDap
  499.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  500.  
  501.    SumLine="Time:                   " timeDap
  502.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  503.    lineoutResult = LINEOUT(ThisOutFile," ")
  504.  
  505.    SumLine="W16DAPIE RPT Filespec:  " infile1
  506.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  507.  
  508.    SumLine="W16DAPIE RPT Analyst:   " name1
  509.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  510.  
  511.    SumLine="W16DAPIE RPT Date:      " date1
  512.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  513.  
  514.    SumLine="W16DAPIE RPT Time:      " time1
  515.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  516.    lineoutResult = LINEOUT(ThisOutFile," ")
  517.  
  518.    SumLine="DAPIE16 RPT Filespec:   " infile2
  519.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  520.  
  521.    SumLine="DAPIE16 RPT Analyst:    " name2
  522.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  523.  
  524.    SumLine="DAPIE16 RPT Date:       " date2
  525.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  526.  
  527.    SumLine="DAPIE16 RPT Time:       " time2
  528.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  529.    lineoutResult = LINEOUT(ThisOutFile," ")
  530.  
  531.    SumLine="Were the two analyses," infile1 "and" infile2", run with the same .LST"
  532.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  533.  
  534.    SumLine= "and with the same EXCLUDE and IFDEF options?"  SameLst
  535.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  536.    lineoutResult = LINEOUT(ThisOutFile," ")
  537.  
  538.    SumLine="Does this source code contain any 32 bit APIs?" all16
  539.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  540.    lineoutResult = LINEOUT(ThisOutFile," ")
  541.  
  542.    SumLine="Additional information about this source code:"
  543.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  544.    SumLine=Additional
  545.    lineoutResult = LINEOUT(ThisOutFile,SumLine)
  546.  
  547.    lineoutResult = LINEOUT(ThisOutFile,'0C'x)
  548. return
  549.  
  550. /* Display Error msg for an invalid file spec and exit */
  551. BadFile:
  552.    say "File does not exist.  Will Exit now -- a file spec for an existing"
  553.    say "file is required."
  554.    exit
  555.  
  556. /* Calculate the effort for this file, includes effort to fix salt & pepper code */
  557. CalcEffort:
  558. if hits1 = 0 | hits2 = 0 then effort = effort1
  559. else effort = firstHit + (subsHit * (hits1- 1)) + effort1
  560. Subtotal = Subtotal + effort
  561. Total = Total + effort
  562. return
  563.  
  564. CleanupAndGo:
  565.    say "Creating file: " outfile
  566.  
  567.    /* Write esc sequence to print portrait */
  568.    lineoutResult = LINEOUT(ThisOutFile,'1b6b'x)
  569.  
  570.    /* close the files */
  571.    lineoutResult = LINEOUT(outfile)
  572.    lineoutResult = LINEOUT(infile1)
  573.    lineoutResult = LINEOUT(infile2)
  574.    lineoutResult = LINEOUT(tmpfile1)
  575.    lineoutResult = LINEOUT(tmpfile2)
  576. exit
  577.