Version history of BSS.EXE 1.00 1st release to public 1.01 Fixed bug in hilighting file name. If user entered "BSS /F *.*", this caused a major problem. Made an additional binary check that looked for lines longer 150 characters. 1.02 Fixed bug with /B switch. This was caused by adding the additional binary check in previous version. 1.03 Added the number of records searched to the statistical info. Changed the way I was calling a couple of subroutines & deleted 1 level. call [call_find] call [call_string] This speeded it up a hair, which offset the speed reduction in adding the # of records found. 1.04 Added FILE SIZE, DATE, TIME of file when used in conjunction with the /F switch. Also added TOTAL BYTES searched, CPS (characters per sec.), & BYTES FREE on current drive. 1.05 Fixed code to handle screen sizes larger than 25 rows X 80 columns. Handled record counting different. Now using a lookup table for setting hilighting & reverse attributes. 1.06 Fixed a bug in record counting that popped up occasionally. Was hard to pin it down, because it was rather obscure. Disabled BYTES FREE on current drive, because I found that it didn't work properly on a Compaq (DOS v3.31 I think). 1.07 Fixed 3 bugs in conjunction with the screen pause function. Thanks to Ray Tackett's observation. 1.08 The /A switch was not doing what I intended it to. Also changed my logic on deciding whether it was a binary file or not. I am now looking in the 1st 4k of the file for lines longer than 134 characters, to determine this. Was finding it to fail with BBS listings w/some graphics characters. Was originally looking in the 1st K of the file for binary characters. Have found no difference in speed on my 386/33 between scanning 1k the old way & 4k the new way. Maybe able to take advantage of the prelimary checking to speed up the search by holding an array of the EOL character positions. 1.09 Started using MASM 6.0 & Spontaneous 3.0 library. Changed the way I was storing the search strings. Am now using a linked list method. 4 byte overhead for each search string. This was changed in getting ready to add a /R=file.nam switch (redirect input search strings). Also added a /BF & /BN switch for only printing file names in a BBS type listing found &/OR the names of the files it found them in. 1.10 Change to the Compact memory model. This allows me to keep the extended information (/?) in a segment by itself, which in turn allows me to define larger arrays in the near segment for search strings. 1.11 The /R=file.nam switch is now working. Increased the search string buffer size to 24k. The maximum number of strings is 4096 (if they were all 2 characters in each string), more typically 1755 if all the strings were 5 characters each. Fixed minor bug with the /B switch. If there were blank lines in the description such as compuserve listings, it would stop at the 1st blank line. 1.12 Added /FS switch for outputting only the size of directories instead of printing file names as well. 1.13 Added another error message. Put the /FS switch in the help display. Fixed a nasty bug that has been in there awhile, but just never ran across it until using the /R=ASCII.IN (this is a file containing all ascii chars.). If you entered 2 search strings that were the same (or mixed case but otherwise the same if you weren't using /E), it would potentially lock up. Added a check for duplicates routine to fix this. Added code to check for another program running BSS (like the run command under windows)an added a pause at the end only if you were using the /P switch. 1.14 Fixed a couple of output format problems. File & subdirectory sizes were not right justified when output to a file. Changed the call cput_chr TO call [call_outchr] Also fixed it so the statistics went to the output file. Was closing the output file before calling the statistics routine. Have mixed emotions about putting it in the output file versus the screen (maybe another switch for this?). 1.15 Turned off printing file names for the /F switch if the /T switch was used. 1.16 Fixed a bug that would not print a match on the last line of an ASCII file if it was not terminated w/a CR,LF. Added UNIX file type compatibilty (they only use LF character instead of CR,LF) 1.17 Added /J switch. Print JUST strings that match, nothing else. 1.18 Fixed a divide by zero bug on calculating cps. This did not lock it up or anything, only displayed an erroneous number, which turns out to be 2 to the 64 power. This only occurred on a fast machine that said it finished in 0 length of time. To fix this problem I just added 1 millisecond to the elapsed time. =============================================================================== 7,822 bytes 18,446,744,073,709,551,516 cps Files: 1 Records: 275 Matches: 0 Elapsed Time: 00:00:00.00 1.19 Fixed an error in the calculating cps routine, that I created by fixing the divide by zero. Speeded up the search routine by 3% for non case-sensitive searches by using a 256 byte lookup table. 1.20 added .procs & .endp to all the functions I created, in order to run it thru the profiler & get some descent information out of it. min_search dw 0 ;minimum search string length 1.21 added a minimum search string length variable, but doesn't quite work the way I want it to, yet. 1.22 took out the second of the following 2 lines: add word ptr [sub_records],1 add word ptr [sub_records+2],0 Since my addition could never go beyond 8192, so it was pointless to do so. 1.23 added some preliminary changes for re-using a wildcard routine for dos file names as well as search strings. Upped the size of the environmental string from 150 to 255. Added printing the statistical info to the output file if /J switch was not used. 1.24 rewrote the find_end routine & the way it was being implimented in hopes of speeding it up, but it was 20% slower instead. I'll put that idea aside for now. 1.25 replaced the switch /L LEAVE screen alone (Do not use STATUS line) with: /L:*? wiLd search (the * & ? can be any 2 characters you wish to use) this version still has some bugs in it though 1.26 got most of the bugs out of the wild search part, but while testing this, found a bug in my hi-lighting routine, which I'll have to fix. 1.27 re-wrote one the hilighting routines & fixed all the bugs that I could find so far with the wild search routine. 1st release to 14 beta testers on the internet. 1.28 fixed 2 major bugs. One of which Fons en Willem found by doing something I wasn't expecting. He pointed me right to address where the error occured. Was not checking beyond the limit of the array. The other bug happened only in conjunction with the /L switch, in it's worst case it would get in an endless loop,but would also not hilight text properly in some cases. Also fixed another minor bug that Fons found. BSS /O=BSS.DOC /? paused before exiting. Not released 1.29 added line numbering feature "/#=n" where n equals the number of columns to reserve for right justifying the line number (5 is the default) & will leave one space between the number & line of text. Text wraps to beginning of next line. Will change this soon to line up with beginning of previous line. Not released 1.30 Changed the way the pause message displayed when using the /P switch. I now temporarily move the status line to bottom of page for the pause only, then switch it back to the top. David Morlitz pointed out that it was not readily apparent that the program was paused. Also fixed a bug when using "/P:15" or any other number did not work correctly. 1.31 Added "/C:#" & "/K" switch & fixed a few bugs 1.32 Added "/WP" & "/WR:#" 1.33 Added a few more error checks. Took out all the NOP's 1.34 Fixed a bug in the "/C" switch if a matching string was found before it got the correct column, it would not find the next 1. Set it so it starts looking in the column specified & if you are not using the "/L" switch, it uses the length of the search string for the loop counter. This also improves the speed for this. Also partially fixed a bug in the "/W" switch. If you used something like "/W:0,1", & it found a match on the line following the matched line, it did not increase the window by 1 or hilight it. 1.35 Fixed the "/W:0,1" bug hopefully. Had to write a couple of short subroutines. Also fixed a bug with the "/B" switch. 1.36 Fixed the bug of doing a directory search from another directory. Also added the ability to do multiple directory searches. 1.37 Fixed a bug in /C where multiple strings may not have been found, a bug in /L ?'s were not always handled correctly. Change my Dos error check. I was assuming Spontaneous's code was returning carry set on writes, but should have been checking for NOT EQUAL. 1.38 minor bug fixes & cleaned up code a little. 1.39 Fixed one bug that showed up only with the /O switch, that gave you some garbage in the output file. A pointer was not getting intialized properly because I had located it in a block of memory that was zeroed out when opening each new file, so it was not pointing to right spot. 1.40 Fixed a problem DOS causes when using BSS in a batch file. If you use a command line like: BSS %1 %2 %3 %4 %5 %6 %7 %8 %9 to handle the most parameters someone would enter, DOS will add a blank character for every parameter not entered. So I added a routine to strip trailing blanks from each command line parameter & disreguard the parameter if the result ended up w/0 characters in it. 1.41 Added /Since & /Before, see docs for further info. These switches are not shown on the brief 1 page display. 1.42 Added /M=NOR & /M=NAND, see docs for further info. Re-enabled /A to be valid with the /W options. Fixed an off by 1 error in the /Before switch. Fixed /I: attribute options so they work more properly. There is still a problem with /I:A that I'll fix in the next version in a couple of days. Updated the Docs that are included in the .EXE. Extract the docs with: BSS/O/? 1.43 fixed bug in /I attribute options. Added prompting if you don't enter anything on the command line. Also rearranged the Switch help screen a little. 1.44 added hilighting for line numbers if wanted. Use /#H=n to impliment. Tim Wilson asked for this switch. 1.45 Added an additional hilighting switch to make it easier to find strings in an output file. Use /H=[] or any other 2 characters you want to surround the match with. Tim Wilson also asked for this one. Also fixed a bug with the /m=nor & /m=nand switch. 1.46 Took out over 6k of commented out code that shouldn't be needed again. 1.47 Fixed 2 bugs, BSS/? kept going back thru the help. BSS /F FILES printed the totals, but if you stepped thru in input prompts it did not. Changed the /J switch slightly to accomodate Stefano Palazzi, took out the Version & name header. 1.48 Fixed 1 bug that occurred in Unix text files. It only occured ocasionally when you used the following switch combination "/w/o" Put another call to the TSTKEY routine in the directory tree subroutine to make hitting an ESCAPE key a little more responsive.