Record of versions/changes

v. 0	20feb95	-kludge to test, open file and just copy stdin->stdout
		-general termcap stuff implemented(co,li)
		-correctly output lines(including lines > co in size)
v. 1	21feb95	-version
		-determine if input from stdin or pipe
v. 2	27feb95	-correctly utilized tgetstr
		-handle some keyboard input," " and invalid keys
		-outputting 2 less lines then needed, redid that
		-compiled under MiNT
v. 3	07mar95 -setbuf works in MiNT to allow instant return of keypresses
		--took a LONG time to get it figured out with ioctl for IRIX
		-added #ifdefs for MINT/UNIX
		-must restore stdin tty to normal before exit(MINT)
		-now handle ^M embedded(e.g. bold(3) and underline is(1)
		-read input data in chunks
		-handle: Q, q, ' ', \n
		-ERROR:  pipe'd data handled incorrectly(fseek...)
v. 4	08mar95 -redid bold/underline/standout mode correctly :-)
		-added option GUESSTAB(output.c)  there is some mysterious
		 method to placing tabs randomly in a file...(?)
		-the redo of bold underline provides a possibility that
		 x may exceed max_to_read if the buffered data
		 runs out during a bold/underline op.('==' to '>=')
		-if standout mode/underline undef., set to bold
		-added another MiNT inconsistency fix, MiNT returns 24 for
		 the column(vt52) as oppossed to 25 which is the actual value
v. 5	11mar95	-to use a pipe, opened /dev/tty for keyboard input
		--modified routines so this could be passed
		-added (!pipe) check in routines that seek(v.3 bug fix)
		-and if from a stream, have NO idea how big file is so do
		 a test and output only "more" vs "more 1/100..."
		-TODO: buffer the input stream if from a pipe
		-execute a fflush before loop to process keyboard since
		 we were having the "more" get buffered and not outputted
v. 6	12mar95	-parse command line option(v)
		-a problem with reading CR/NL in files
v. 7	13mar95	--worked fine in IRIX
		--lost data in MiNT(too many lines in file, missed top of file)
		---tracked it down: open a file with "rb" as opposed to "r"
		   but did not work for stdin.
		----something in fread does some preprocessing, changed them 
		    all to read and it works fine.
v. 8	13mar95	-if from stdin, fell into another loop on exit, just exit
		 in that loop.
		-implemented 'c' option
		-implementing 'f' option
		--redid formatting of tabs, though still not perfect
		  got rid of GUESSTAB compile time option(v.4)
v. 9	14mar95	-implemented 'r' option -- for chars > 127 its in octal
		-implemented 'w' option
		--for multiple files, optw is automatically set
		-moved the section in output.c that controlled printing the
		 "more" prompt to its own procedure
		--added PROMPTNORMAL, PROMPTEND, PROMPTVERBOSE to do_prompt
		-also, made most termcap variables global
		-the 'v' option just exits now
		-added __DATE__ to version option
v. 10	15mar95	-now processes command line options when in a pipe
		--moved the process command line options to its own procedure
		-added UPPERASCII(output.c) compile time option for MiNT and
		 others that can print the extended ascii range
		-fixed the "more xx/yy" display, yy was one too big
v. 11	16mar95	-make bigbuf unsigned since ascii > 127 was ending up signed
		-got rid of UPPERASCII(v.10)
		-modified 'r' option, if not set interpret control and high
		 ascii characters into number representation.  if 'r', and
		 value > 127, output the actual ascii code(MiNT especially)
v. 12	17mar95	-implemented 'l' option.
		-made show prompt, and routine to fill screen with '~'
		 seperate functions
v. 13	18mar95	-implemented 'u' option
		-redid the tests for a null in under, to first set it to
		 standout, and if that is null, set it to reverse.
		-moved the processing of switched characters in commandline
		 to a seperate function
		-process environment 'MORE' when program starts
		-added option 'doing' to do_prompt to allow us to select if
		 we want keyboard input or not[TRUE-yes]
		-added PROMPTINVALID to do_prompt
v. 14	19mar95	-implemented 'd' option
		-implemented 'm' switch which will suppress ^M from being
		 [?]displayed - should I just make that default for Atari?
		-redid "more xx/yy", if from a pipe show "Line nn" else
		 show "more xx/yy"
		-handle: = d ^D \b 
		-handle: 1 2 3 4 5 6 7 8 9 0 (and build a number)
		--but don't actually use the number yet
		-added PROMPTEND2,PROMPTLINE to do_prompt
v. 15	20mar95	-incorporated version.c into main.c
		-split output.c into process.c
		-BUG: if boot with init, upon reaching the 80th character,
		 MiNT automatically does a nl, causing the top lines to
		 scroll off(m main.c, m -f main.c helps but not much)
v. 16	23mar95	-removed code(v.4) that compensated for MiNT's termcap since
		 if in a window, can not make assumptions
		-NOTE: (v.15) unless (-f), maybe just counter characters and
		 manually increment lines w/out doing a nl.(that way getty can)
		[?]--redid fold lines like above, see how it works
		-rudimentary implementation
		--implemented -### switch
		--implemented +/regexpression switch
		-added __TIME__ to version
		-implemented optpl switch
		--and strangly enough, do_prompt works perfectly??? :-)
v. 17	24mar95	-implemented optml switch
		--though the count is way off for the # of lines[feature?]
		-combined PROMPTEND & PROMPTEND2, and now display next filename
v. 18	25mar95	-made file.c, and moved read_forward there
		-started implementing read_backward, though its brain-damaged
v. 19	26mar95	-read_backward is now correctly implemented as long as stay
		 in the current chunk of data
		--having big difficulties handling skipping through chunks
	27mar95	-finally seem to have backwards fixed
		[BUG]--the count does get off when lines are greater than 80
		--correctly backs up one screen exactly(unless the above)
		--handles chunks of data ok
		---incorporated an error routine for first bit of file
		--handles reading more data if we happen to be counting 
		  backwards trying to find the beginning of the first line
	28mar95	-the error routine for the 1st bit works, but if m main.c and
		 go back, around line 45 it errors
	29mar95	-fixed the problem from 28mar, when we count characters we
		 might increment mlcounter just when it is 0, causing it to
		 go .....-2,-1,0,2,3,4,........  Just made loop check for
		 >=0 instead of ==0
v. 20	29mar95	-handle: z (not fully)
		-turned curson on/off when displaying file
		-"am" auto margin, is the reason MiNT wraps the line
		--how to fix?
v. 21	3apr95	-do_prompt(m main.c) would be off 2 lines since only 21 lines
		 displayed at the onset, fixed this by using 2 static offsets
v. 22	11apr95	-been working on v.21 to get the count of the lines to be
		 right.  I have a pretty good version right now, but the
		 count does still get off.  Keep at it......
		 (specifically m main.c back and forth then to beginning...)
		-buffer piped data, and correctly choose the prior chunk
		--[BUGS]will write the same data again, if gone backwards
		--need some good error checking
v. 23	17apr95	-finally have the program counting the lines correctly, so
		 now do_prompt works flawlessly  :-)
		--still need to test if we go m +200 countme, then go
		  backwards.(FAILS)
		-routine checks for a line already being in longlines[] so
		 we no longer have problem with (v.22)
v. 24	18apr95	-added cls(optc) check when go backwards, and now just print
		 'back 1 page...' once.
		-to fix offset counting glitch(v.23) just sort the longlines
		 array and it works great
v. 25	19apr95	-rudimentary 'v' option implemented, it sort of works
		-when at column 0, char 0, print a <cr> so tabs arent expanded
		 incorrectly(DIDNT SEEM TO HELP?)
v. 26	20apr95	-'v' option invokes editor correctly, now we just need to
		 redraw the screen on return....will also be same code for
		 when we do 'h' [help]
		--fails on more than one invocation of 'v'
		  fixed the failure by switching from signals/longjumps to
		  the wait command.
		-made setup_tty a new function, I think we will have to
		 return the tty to a normal status before allowing 'v'
v. 27	23apr95	-added a change to handling \n keyin, if have not displayed
		 a full page, then set it to mlines-2 which will move down
		 one line at a time
		-[BUG]have code to handle redrawing screen(after 'v' and
		 with 'l') but in some files it chokes if done on first line
		-'h/?' option work, fork "more" to display help file
		-':q/:Q/:n' options implemented
		-'s/f' option implemented(though without ## before)
v. 28	25apr95	-':f' option implemented
		-redid number building routine(v.14 & v. 27)
		--implemented in (s/f/b/^B/'\n')
v. 29	26apr95	-added PROMPTCURR, which is used by the ':f' option
		-in file.c, there was a fix for a nl being the second line
		 of the file(eg. m process.c) bu we had it as xx=-1 instead
		 of xx-=1; this fix did not work even when I did xx-=1 so
		 have removed it completely(it would skip a nl, but then the
		 count was off)
	27apr95	-fixed cls vs. cleol glitch
		-[BUG FIX] in output.c when we were determining which lines were
		 to long, we did '<mcolumns', but if a line was 81 chars long
		 it went through(which made it scroll an extra amount when the
		 terminal wrapped), changed to '<mcolumns-1' and it works
		-do a cleod when done with a file to clean up the display(need
		 because we are using cls and cleol to repaint)
	28apr95	-added fix_countlines to output.c, there was a glitch that
		 could happen if you were backing up and the last line was
		 a longline, then you backed up one more time(this caused
		 counlines to be off by one)
		-added fix_skip which will set testvalue iff the last line
		 is a longline on the initial skip(e.g. m +59 countme, and
		 line 81 is a longline, it will say(58/????) so we add one
		 to testvalue and it says 59/???? which is correct)
		-[BUG FIX] we need to use startover when the user presses
		 return and the last line is a longline, also fixed a bug here,
		 I had it as x-2 which went back one too many characters,so
		 made it x-1.  The bug in (v.27 'l') and with skipping was
		 that startover was getting used when it wasnt suppossed to
		 be (e.g. no <cr>) so I used an AND of startover && retflag
		 which solved the problem.
v. 30	29apr95	-finally have v.29 working in all instances, my logic was
		 a little flawed in ouput.c
		--combined logic for fix_skip & ret_flag since same
		-when do an 'l', must turn of "retflag", e.g. in 'v' & '?'
		--added this to 'l/v/?'
		-added 'cleod' to filler and '-l' commandline option
v. 31	30apr95	-redid bold/underline[much faster now]
	1may95	-redid tabs[work correctly now]
v. 32	3may95	-if going backwards and the top line of the next page was just
		 a \n, it counted one too many, fixed this
		-still had problems w/ v.29, specifically w/ fix_countlines
		--I had added a routine to fix it in output.c, when I fixed
		  the problem with file.c (top of read_backward when I went
		  xx--) it made the previous fix invalid....
		-fixed redraw by adding dum1 to it
		-fixed problem when piped, it didnt execl correctly, just
		 needed to close stdin and open /dev/tty
v. 33	4may95	-redid outputting text by buffering characters[much faster]
		-'.' option implemented
		-fixed routine that inputs numbers before a command, it was
		 not subtracting from the number if you pressed <bs>
		-added PROMPTNONEXT
v. 34	7may95	-now can use commands when at the very end of a file
		-fixed a problem with PROMPTEND(had to test for a pipe)
v. 35	9may95	-implemented basic regex
		--will offset to the matched line if regex on command line
v. 36	16may95	-'/' option implemented...
		-regex now works in all cases when you search
		--[GLITCH] if its found in a longline, the top of the line
		  scrolls off the screen
		-added PROMPTNOREGEX for a search that doesnt find anything
		-successfully handles a '/' after a regex has been entered
		-added routine to free memory from globrgx before refill its
		-implemented RGXCHAR, RGXDOT, RGXSTAR
v. 37	17may95	-implemented RGXBOL, RGXEOL
		-fixed glitch in v. 36 with the longlines containing regexp
		 scrolling off the screen
		-added PROMPTMISSING for when no regexp entered and user wants
		 it searched for
		-'n' option implemented(basically just a goto to '/' handler)
		-implemented RGXBOW, RGXEOW, and \(escape)
v. 38	18may95	-implemented RGXRNG, RGXVAL
v. 39	23may95	-implemented RGXNRNG, RGXNVAL
		-regexp will also work from a pipe
	25may95	-fixed a glitch in handle_bs, if had '+''\b''o' to print a
		 bullet, it screwed up the processing of that.
		-added PROMPTNOEDIT when try to edit from a pipe
v. 40	6jun95	-added numerous fixes to bold/underline handling.
		-ignore SIGINT,SIGQUIT,SIGTERM,SIGTSTP
		-was getting an 'F' printed as first character whenever did
		 an 'l' or skip or search with countme(from 1st page).  The
		 'F' came from the 1st character of next page('F'ILE) and
		 was printed out.  Determined this happened cuz cntline was
		 not getting reset properly to 0, so added cntline=0 in
		 about 4 places in output.c
v. 41	7jun95	-changed what is displayed when going backwards, it now gives
		 accurate page count(in output.c ~ line 425)
v. 42	11jun95	-redoing regexp stuff since it was really flawed.  Now have
		 RGXCHAR, RGX(BE)OW, RGXDOT, RGX(BE)OL working
		-[NOTE] we added 'glox' variable to tell us when we needed
		 to reprocess the part that choked, in RGXDOT if were looking
		 for \<.ption\> and the line was "^ option" it should find it,
		 but I believe it is possibly flawed?
v. 43	21jun95	-fixed a glitch in the routine which returned the top_of_form
		 in a string form for 'v'(handled top_of_form==100 wrong)
		-RGXSTAR works with:
		--RGXCHAR
		--RGXRNG
		--RGXNRNG
		--RGXVAL
		--RGXNVAL
		--RGXDOT, though it is flawed(opt.*n shows this.  I think
		  it has something to do w/ hitend and the 'n'(last char))
v. 44	4jul95	-added code to check for a binary file
		-removed 'check_duplicate', it was redundant
		-added PROMPTILLREG for an illegal regexp entered
		-believe I have RGXDOT fixed, determined that it was exceeding
		 the BUFSIZ in the DOT handling, so put a check for x<max_to_read
		 and it works fine.  [STILL NEED TO TEST COMPLETELY]
	5jul95	-changed how we handle if file not found
		-made mcolumns/mlines global so we never reference an 80 char
		 line
		-seperated the version/changes notes into a file called 'notes'
		 from main.c
v. 45	11jul95	-experimented with using dup2 to set up for piped help
		 e.g. cat countme | m; ?  you get 'not priveledged error'
		--I would guess that we will be installing this as root, so
		  will not have that problem, something definitely has to be
		  done with stdin, I just need a way to chop it off???
		--the error comes cuz you are in a pipe, therefore stdin does
		  NOT belong to you.
		-'^L' option implemented
		-':!' option implemented
v. 46	12jul95	-believe I have the fork figured out, if you close stdin in
		 the forked process everything behaves itself
v. 47	19jul95	-added message stating we were counting lines
		-make new file, 'signal.c' to hold signal related stuff
		-redid all forks like in v. 46, also got rid of the goto's
		 around the 'wait()'
		-implemented basic regex error checking:
		-- *something
		-- ensure matching [], and no invalid inside []
		---[BUG] on /PRO[Abcd    >>>>crash
		-- begin/end must be at the actual begin/end for ^,$,\<,\>
v. 48	24jul95	-fixing global glitch in handle.c
		-forgot to reset mccounter in 'filler' to 0
		-- (v.47)added '\' handling to regex error checking
		-cleaned up a couple procedures in various source files
		-in main.c, check a commandline regexp to ensure it is valid
		-fixed bug in v.47, we now ALWAYS check for a valid regexp
		 before we do any further processing on it.
		--redid case '\' in process.c
		  0:no regexp entered
		  1:no regexp found
		  2:invalid regexp entered
		-did away with printf in main.c that said, 'no valid next
		 file, exiting..', since it came up when did 'm invalidfile'
		 which was not the right place, also it served no purpose
v. 49	25jul95	-getting ready to release 'more'
		--doing more.1 and more.help
v. 50	15aug95	-implemented <#><sp>
		-implemented <#> z
		--if size less than size of display, didnt erase screen
		  below the "more" prompt.  added a call to cleod in output.c
		--[POTENTIAL GLITCH] no range checking is performed
		-redid number handling in process.c, we know start with
		 number==0.  this effected <space>,<cr>,z,s,f,b
		-implemented <#> <cr>
	19aug95	-added some more documentation
	21aug95	-fixed save_number for '.' command, for <4><sp>, the period
		 command was handled wrong
		-implemented <#><d or ^D>
		-implemented <#> :n
		--added PROMPTNONEXTF
	22aug95	-implemented <#> :p
		--added PROMPTNOPREV and PROMPTNOPREVF
		-added ^L to the command list of commands that will not move
		 to a new file at the end of output.c 
		-implemented <#> /regexp
		-implemented <#> n
	24aug95	-implemented ' (there are a couple bugs--ref. NOTES)
	25aug95	-took all termcap initialization out of output.c and put
		 it into termcap.c
	26aug95	-fixed ', had to remove a line in file.c that was bumping
		 mlcounter++ for a line longer than 80 chars long
	29aug95	-fixed ', it errored when a longline was the VERY last line
		 on the current page, added a global variable fix.
		--WORKS GREAT!
	30aug95	-changed :q/:Q to exit right away
		-redid makefile
		--adding install, dist, clean
		-updated more.1 & more.help
